Ok after thinking about this i def thought of a tolerable way...kinda a
workaround but eh -

if you have the same situation you can flip the dependency:


  <camel:camelContext id="camelContext" />

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

And then the java code to support this all?

UpdateMgr:
public class UpdateMgr implements StartupListener {
  …
public void onCamelContextStarted (CamelContext context, boolean
alreadyStarted) throws Exception { 
                                this.start ();
}
…
public void setCamelContext (CamelContext context) {
                context.addStartupListener (this);
}
…
}

this seems reasonable, but please feel free to fry me alive if it isn't :)

--
View this message in context: 
http://camel.465427.n5.nabble.com/Adding-a-startup-listener-via-spring-tp4306163p4306258.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to