Hi

Could you create a JIRA ticket for this.
Camel should honor the shouldStartContext when it receives this spring
refresh event.



On Thu, Jun 11, 2009 at 5:33 PM, akuhtz<[email protected]> wrote:
>
> 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.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to