Hello Hilde,

I would not say that it is not allowed to have anything between the to and from.
You can still have processors in between and you can send the request
to direct endpoints.

To me it seems like the first route (the one starting with FTP
endpoint) considers that the unit of work is done when the message is
passed to the seda endpoint, and there for the temporary local file is
removed.
So it does not exists when the route starting with the seda endpoint
tries to accesses it.

If you instead use a direct endpoint it will be executed in the same
thread (and unit of work) so the file will be left in the local work
dir until both routes are done.
It is possible that you can also use a seda endpoint with
"waitForTaskToComplete=Allways".

I stumbled on the same problem when I changed a set of routes that
looked something like this.
---
from("ftp:..").process(someprocessor).process(someother).to("direct:a");
from("direct:a").to("file://finaldest/");
---
To use seda instead:
---
from("ftp:..").process(someprocessor).process(someother).to("seda:a");
from("seda:a").to("file://finaldest/");
---
The first worked and the later gave the same error you are having.

I have a test case for this "problem" on my other computer I can push
it to a gist tomorrow if you are interested.

Best regards
Pontus Ullgren


On Mon, Sep 10, 2012 at 2:44 PM, Hilde <[email protected]> wrote:
> Hello *!
>
> My assumption is that when using the option /localWorkDirectory/ it is not
> allowed that anything can be placed between from() and to() as the example
> will show:
>
> from("ftp://[email protected]?password=secret&localWorkDirectory=/tmp";).to("file://inbox");
>
> Though my case above has several /seda:/ components inside
>
> Can anybody confirm this?
>
> Hilde
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/ftp-with-option-localWorkDirectory-tp5718783p5719036.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to