[ 
https://issues.apache.org/activemq/browse/CAMEL-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56625#action_56625
 ] 

Serge Merzliakov commented on CAMEL-2309:
-----------------------------------------

I have tried on both Windows 7 and OS X 10.6 and issue still occurs. I have 
reviewed the unit tests Claus wrote and they are the same as mine. Changing JMS 
endpoint to other type makes no difference.

I switched on debug logging (on Windows) and noticed that the file appears to 
be moved to /before directory but then later moves it to /before/.camel by the 
"GenericFileRenameProcessStrategy". Here is the debug log:

2009-12-23 09:35:53,152 - DEBUG {GenericFileRenameProcessStrategy} - Renaming 
file: GenericFile[file1.txt] to: GenericFile[before\file1-moved.txt]
2009-12-23 09:35:53,152 - DEBUG {FileUtil} - Tried 1 to rename file: 
C:\dev\CamelSquared\resource\test\runtime\file1.txt to: 
resource\test\runtime\before\file1-moved.txt with result: true
2009-12-23 09:35:53,153 - DEBUG {FileConsumer} - About to process file: 
GenericFile[before\file1-moved.txt] using exchange: Exchange[GenericFileMessage 
with body: resource\test\runtime\before\file1-moved.txt]
2009-12-23 09:35:53,179 - DEBUG {DefaultManagementAgent} - Registered MBean 
with objectname: 
org.apache.camel:context=sergepc/camel,type=producers,name=JmsProducer(0x500c954e)
      <...JMS Stuff here>
2009-12-23 09:35:53,301 - DEBUG {GenericFileOnCompletion} - Done processing 
file: GenericFile[before\file1-moved.txt] using exchange: 
Exchange[GenericFileMessage with body: hello from file1-SIMPLE]
2009-12-23 09:35:53,302 - DEBUG {FileUtil} - Tried 1 to delete file: 
C:\dev\CamelSquared\resource\test\runtime\file1.txt.camelLock with result: true
2009-12-23 09:35:53,303 - DEBUG {GenericFileRenameProcessStrategy} - Renaming 
file: GenericFile[before\file1-moved.txt] to: 
GenericFile[before\.camel\file1-moved.txt]
2009-12-23 09:35:53,304 - DEBUG {FileUtil} - Tried 1 to rename file: 
resource\test\runtime\before\file1-moved.txt to: 
resource\test\runtime\before\.camel\file1-moved.txt with result: true


> "preMove" option creates unwanted .camel directory
> --------------------------------------------------
>
>                 Key: CAMEL-2309
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2309
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: OS X 10.6
> Windows 7
> JDK 1.6.16, 1.6.17
>            Reporter: Serge Merzliakov
>            Assignee: Claus Ibsen
>            Priority: Minor
>
> Given the following Camel context to copy a text file to a JMS queue
>    <camel:camelContext id="camel">
>       <camel:route id="file-to-jms">
>          <camel:from 
> uri="file:resource/test/runtime?preMove=before/${file:name.noext}-moved.${file:ext}"/>
>          <camel:to uri="activemq:queue:dest"/>
>       </camel:route>
>    </camel:camelContext>
> I noticed that the "preMove" attribute puts the file in:
>     ./before/.camel/FILE-moved.TXT
> instead of what I expected:
>    ./before/FILE-moved.TXT
> the "move" attribute works how I expect, and places the file in  
> ./before/FILE-moved.TXT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to