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

Camel file endpoint loses modification date with preMove attribute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: fuse-7.0
    • Fix Version/s: fuse-7.1
    • Component/s: Camel
    • Labels:
      None
    • Environment:

      Fuse 7.0 GA (Karaf)

    • Steps to Reproduce:
      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>

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jpoth John Poth
                Reporter:
                kboone Kevin Boone
                Tester:
                Tomáš Turek
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: