You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Matvey <ma...@inbox.ru> on 2009/11/23 08:47:41 UTC

How to configure Camel Routes under JBOSS 5

ActiveMQ + JBOSS5 + Camel.

An Idea is to configure Camel Producers automatically using annotations
inside of EJB3 bean (mostly session beans). Is that possible? 

It looks like I can configure bean for every JMS queue in a Spring config
file and than get this bean in EJB3 using onEJBCreate method, but this
solution looks not really optimal as Camel supports DI with annotations ant
it should be possible to set producers using @Producer annotation. It would
be nice as well, to use only one ActiveMQ configuration file to configure
all Camel/Spring beans as this file is automatically used upon ActiveMQ
start.
-- 
View this message in context: http://old.nabble.com/How-to-configure-Camel-Routes-under-JBOSS-5-tp26473852p26473852.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to configure Camel Routes under JBOSS 5

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Nov 23, 2009 at 8:47 AM, Matvey <ma...@inbox.ru> wrote:
>
> ActiveMQ + JBOSS5 + Camel.
>
> An Idea is to configure Camel Producers automatically using annotations
> inside of EJB3 bean (mostly session beans). Is that possible?
>

Camel uses the help of Spring to inject those beans. So in case Spring
can do that to an EJB3 then I cannot see why it should not work with
Camel also.
Why dont you try it out?

Otherwise you can use a regular POJO and have all the DI work on it
and then let the EJB3 delegate to that POJO.
Then you logic is also not tied into the EJB.



> It looks like I can configure bean for every JMS queue in a Spring config
> file and than get this bean in EJB3 using onEJBCreate method, but this
> solution looks not really optimal as Camel supports DI with annotations ant
> it should be possible to set producers using @Producer annotation. It would
> be nice as well, to use only one ActiveMQ configuration file to configure
> all Camel/Spring beans as this file is automatically used upon ActiveMQ
> start.
> --
> View this message in context: http://old.nabble.com/How-to-configure-Camel-Routes-under-JBOSS-5-tp26473852p26473852.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus