Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-9125

Camel file endpoint loses modification date with preMove attribute

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.1
    • fuse-7.0
    • Camel
    • None
    • % %
    • Hide

      Deploy the following Blueprint route. Copy a file into the work/ directory. Note that that file:modified is 0.

      <?xml version="1.0"?>
      <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
        <camelContext id="cbr-example-context"  xmlns="http://camel.apache.org/schema/blueprint">
          <route id="cbr-route">
            <from id="_from1" uri="file:work/?preMove=${file:name.noext}.busy"/>
            <log id="_log1" message="Got file ${file:name} modified=${file:modified} "/>
          </route>
        </camelContext>
      </blueprint>
      
      Show
      Deploy the following Blueprint route. Copy a file into the work/ directory. Note that that file:modified is 0. <?xml version= "1.0" ?> <blueprint xmlns= "http: //www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd" > <camelContext id= "cbr-example-context" xmlns= "http: //camel.apache.org/schema/blueprint" > <route id= "cbr-route" > <from id= "_from1" uri= "file:work/?preMove=${file:name.noext}.busy" /> <log id= "_log1" message= "Got file ${file:name} modified=${file:modified} " /> </route> </camelContext> </blueprint>

      This is a change in behaviour from Fuse 6.3. When the preMove attribute of the file endpoint is used to rename a file prior to processing, the modification timestamp is lost. In Fuse 6.3, the modification timestamp of the renamed file was the same as the original, and reported as such by Camel.

            johnpoth John Poth
            rhn-support-kboone Kevin Boone
            Tomas Turek Tomas Turek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: