You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lucasweb <lu...@me.com> on 2014/10/16 20:25:46 UTC
Re: ProducerTemplate without using Spring
I'm using the camel-cdi component to inject ProducerTemplates into my EJB's
e.g.
@Inject
@Uri("jms:ToolQueue?preserveMessageQos=true")
ProducerTemplate toolQueueMessageProducer;
My understanding is that the camel-cdi component should manage the look up
and lifecycle of the producer template for me.
Is this correct?
--
View this message in context: http://camel.465427.n5.nabble.com/ProducerTemplate-without-using-Spring-tp5739099p5757633.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: ProducerTemplate without using Spring
Posted by Charles Moulliard <ch...@gmail.com>.
Hi Lucas,
This is correct. Here is a unit test part of the camel project where you
can see that we support 2 options (using @Produce annotation or @Inject
@Uri)
https://github.com/apache/camel/blob/master/components/camel-cdi/src/test/java/org/apache/camel/cdi/ProduceInjectTest.java
https://github.com/apache/camel/blob/master/components/camel-cdi/src/test/java/org/apache/camel/cdi/support/ProduceInjectedBean.java
Regards,
On Thu, Oct 16, 2014 at 8:25 PM, lucasweb <lu...@me.com> wrote:
> I'm using the camel-cdi component to inject ProducerTemplates into my EJB's
> e.g.
>
> @Inject
> @Uri("jms:ToolQueue?preserveMessageQos=true")
> ProducerTemplate toolQueueMessageProducer;
>
> My understanding is that the camel-cdi component should manage the look up
> and lifecycle of the producer template for me.
>
> Is this correct?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/ProducerTemplate-without-using-Spring-tp5739099p5757633.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog : http://cmoulliard.github.io