camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thelonesquirrely <>
Subject Adding a startup listener via spring
Date Fri, 15 Apr 2011 17:52:30 GMT

The problem I am having involves starting a thread _after_ the context has
fully started.  The thread makes some calls to some routes, and if they
aren't started i get some exceptions.  

To get around this now, I simply delay the start of the thread (Major hack)
- and everything goes well.  
But I'd like to fix this up.  I am using spring to configure my entire
project, and I don't see any XML that I can use to specify which bean to
call, or which method. 

So the thing looks like this:

  <camel:camelContext id="camelContext" />

and some bean: 
  <bean id="updater" class="some.class.that.impls.StartupListener" />

I'd like to be able to say something like this:  

  <camel:camelContext id="camelContext" >
    <camel:startupListener ref="updater" />

But i don't see any way to do this? Am I missing something?  I don't want to
have to toss out spring or write a wrapper class if at all possible...

Thanks for any advice you have!

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message