Hi,
I would like to be able to run the same code (or very close) both inside and
outside an osgi container (I am using servicemix/karaf).
Normally, I set up via code like:
jndiContext = new JndiContext();
context = new DefaultCamelContext(jndiContext);
....
and add routes as needed:
context.addRoutes(new RouteBuilder() {
public void configure() {
errorHandler(deadLetterChannel("bean:DeadLetterChannelProcessor?method=handleError").maximumRedeliveries(1));
from("activemq:queue:myqueue").to("bean:ThisComponent?method=someFunction");
}
});
>From other posts, I see the solution is to use CamelContextFactory instead
of DefaultCamelContext.
So, Is there any way to just create the context differently based on whether
I am in a container? Or do I need to separate setups & code?
Thanks,
Steve
--
View this message in context:
http://camel.465427.n5.nabble.com/Inside-Out-of-OSGI-tp4347446p4347446.html
Sent from the Camel - Users mailing list archive at Nabble.com.