Hi Bovas,

startupOrder will only guarantee that route 1 will start before route 2.
It wont guarantee that route one will find a file and that file will
reach the bean before route 2 message reaches the same bean.

If you have such a dependency in your routes, I'd suggest you change
your routing logic a little bit. May be you can start the second route
from the first route, once the bean has been initialized.
Or if you need some data from first file to process the second file,
may be you can use the aggregator pattern to merge both files and then
use the bean...

Bilgin


On 22 July 2013 16:04, Bovas <bovas.t...@gmail.com> wrote:
> Hi everybody
>
> I use camel 2.11.0 and java/groovy DSL
>
> I explain my problem. I have a first route which runs a method bean, and my
> second route should start after the end of the first route.
>
> from("file://*Directory*?fileName=*myfile.txt*")
>         .startupOrder(1)
>         .to("bean://mymethods?method=*methode1*")
>
> from("file://*Directory2*?fileName=*filenameout*")
>         .startupOrder(2)
>         .to("bean://mymethods?method=*methode2*")
>         .to(folder)
>
> I use startuporder but it doesn't work every time. My method 1 initialize a
> variable from the bean, and I need to use this variable in the second
> method.
>
> schema :
> from directory1---->method1
>                                        from
> directory2------>method2------->to folder
>
>
>
>
> -----
> regards,
> Bovas
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Probleme-with-startorder-tp5736034.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to