camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: spring.Main bind?
Date Fri, 05 Dec 2014 18:48:25 GMT

When using Camel with Spring it uses the spring app context as
registry, so you need to use that, eg the spring way.
I guess you can grab somehow the spring app context, and use its api
to bind. And if that is possible, maybe we can add a bind operation to
the spring main as a facade for that.

The bind method is for standalone mode, where Camel uses its own
registry, eg a plain map aka SimpleRegistry.

On Fri, Dec 5, 2014 at 7:17 PM, Colm O hEigeartaigh <> wrote:
> Hi all,
> Fairly basic question here. According to the following link, the Main class
> has a "bind" method to add classes to the registry:
> // bind MyBean into the registery
> main.bind("foo", new MyBean());
> However this isn't available for spring.Main. How can I add classes to the
> registry using spring.Main? I'm aware I can do it in the spring file...just
> wondering if there is an easy way to do it via code.
> Colm.
> --
> Colm O hEigeartaigh
> Talend Community Coder

Claus Ibsen
Red Hat, Inc.
Twitter: davsclaus
Author of Camel in Action:

View raw message