Hi,

I've a spring based web application that has 2 applicationContexts (the
second has the first as parent). My problem is that the SpringCamelContext
listens to the ContextRefreshedEvent and starts the camel context. 

This works fine if you have only 1 context but if the ContextRefreshedEvent
of the second context is received the routes are started a second time. 
The second start of the camel context is catched correctly (in
ServiceSupport) but I think the the startRoutes() in the start()-method of
DefaultCamelContext should also prevent to be called twice...

My config details: I start the camel context from another thread than that
one that creates the ApplicationContext and already I played with the
shouldStartContext set to false but this prevents the start the camel
context at all.
I know that my scenario with the different threads cause this problem but it
should be possible to prevent the automatic start with the
ContextRefreshedEvent but start the camel context manually.

Andreas
-- 
View this message in context: 
http://www.nabble.com/How-to-prevent-routes-from-started-twice--tp23983653p23983653.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to