On Mon, Mar 18, 2013 at 12:16 PM, Gert Villemos <gville...@gmail.com> wrote:
> How can I in the 'configure' method of a RouteBuilder add beans to the
> registry?
>
> Im in a RouteBuilder creating a route using Netty. The Netty URL reference
> encoder/decoder beans. I need to create and insert these beans in the
> registry.
>
> The Netty description (last code example) indicates that you can simply do;
>
> Registry registry = camelContext.getRegistry();
> ...
> registry.bind("spf", serverPipelineFactory);
>
> However the 'bind' method is not a method of the Registry interface (I think
> its a method only of the JNDI registry). Im using Camel 2.10.2.
>
> What am I doing wrong?

DefaultCamelContext creates and returns a JNDI registry as default.
So assuming you're using a DefaultCamelContext, you'll need to

JndiRegistry registry = (JndiRegistry) camelContext.getRegistry();

Don

Reply via email to