Re: How to instanciate a bean in camel registry for use with @produce annotation

2015-07-08 Thread Benjamin Legendre
create the bean instance using Camel's injector and it does the ioc thingy MyBean myBean = camelContext.getInjector().newInstance(MyBean.class); On Wed, Jul 8, 2015 at 12:02 PM, Benjamin Legendre wrote: > Hi Claus, > > Ok, But when we register the bean manually in the regi

Re: How to instanciate a bean in camel registry for use with @produce annotation

2015-07-08 Thread Benjamin Legendre
uot;myMethod") .bean("myBean", "myMethod") On Wed, Jul 8, 2015 at 11:14 AM, Benjamin Legendre wrote: > Sounds good unfortunately this doesn't work. > > Here is a simple case which reproduces the problem: > >

Re: How to instanciate a bean in camel registry for use with @produce annotation

2015-07-08 Thread Benjamin Legendre
try for use with @produce annotation You can implement the IsSingleton interface on your bean On Mon, Jul 6, 2015 at 3:50 PM, Benjamin Legendre wrote: >> If you refer to the bean just by the classname, then Camel creates an >> instance and does the IoC (eg also @Produc

Re: How to instanciate a bean in camel registry for use with @produce annotation

2015-07-06 Thread Benjamin Legendre
: users@camel.apache.org Envoyé: Lundi 6 Juillet 2015 14:59:16 Objet: Re: How to instanciate a bean in camel registry for use with @produce annotation On Mon, Jul 6, 2015 at 2:23 PM, Benjamin Legendre wrote: > Thanks Hans and Claus for answer. > > Hans, > > I don't use Spring

Re: How to instanciate a bean in camel registry for use with @produce annotation

2015-07-06 Thread Benjamin Legendre
ry for use with @produce annotation Refer to it by its name, and use beanRef .beanRef("dtsm", "normalize") On Mon, Jul 6, 2015 at 12:36 PM, Benjamin Legendre wrote: > Hi, > I'm using Camel 2.15.2 inside a stand alone java application. > > I do not figure how to

How to instanciate a bean in camel registry for use with @produce annotation

2015-07-06 Thread Benjamin Legendre
Hi, I'm using Camel 2.15.2 inside a stand alone java application. I do not figure how to add a bean in the Camel context in order to inject a ProducerTemplate using @Produce on a property of my bean. I my scenario The producer is not injected. Here is the bean binding: SimpleRegistry