I meant that I in the RouteBuilder::configure have; JndiRegistry registry = (JndiRegistry) getContext().getRegistry(); // DO NOT WORK!
----------- Thanks for the suggestion. The code PropertyPlaceholderDelegateRegistry registry = (PropertyPlaceholderDelegateRegistry) getContext().getRegistry(); JndiRegistry jndiRegistry = (JndiRegistry) registry.getRegistry(); Gives me a reference to the JndiRegistry, but on first bind() I get an exception; javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial If I need to manually initialize the JNDI context, then this smells like Im doing something I should not be doing, i.e. bypassing the 'right' way of doing things... -- View this message in context: http://camel.465427.n5.nabble.com/Programatically-adding-beans-to-a-registry-in-a-RouteBuilder-tp5729358p5729370.html Sent from the Camel - Users mailing list archive at Nabble.com.