You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dpravin <pr...@gmail.com> on 2016/09/13 01:31:52 UTC

JMS Component configurations

Hello All,

We are in process of implementing hundreds of routes that will use Camel.
Many of the routes will use remote instance of AMQ, local AMQ or WMQ to
process the messages. Each of the routes will have the same (connection
pooling) code/configuration repeated to connect to any one of these
resources. Is there any solution that can reduce this boiler plate
code/configuration. 

Thanks,
Pravin



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-configurations-tp5787499.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS Component configurations

Posted by dpravin <pr...@gmail.com>.
All,

I tried following approach, however not sure if this is the right solution.

I extended a class from JmsComponent. Instantiating this bean in my
blueprint file and passing a pid to load the property file at runtime.

Constructing following objects in the custom JmsComponent that are required
for connection pooling,
JmsConfiguration, JcaPooledConnectionFactory, ActiveMQXAConnectionFactory
and setting the configuration object on JmsComponent. This works fine when
deployed on the server. However not able to construct the objects
appropriately for unit testing.  

Appreciate any help.



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-configurations-tp5787499p5787615.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS Component configurations

Posted by dpravin <pr...@gmail.com>.
Thank you all for your responses.

Appreciate if you could elaborate. Any examples will be helpfull.



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-configurations-tp5787499p5787614.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JMS Component configurations

Posted by Quinn Stevenson <qu...@pronoia-solutions.com>.
I’ve done this a few different ways, but it depends on your routes and deployment technology.

For example, when I’m deploying to a Karaf/OSGi container, I’ll create RouteBuilders that I can configure with the specifics of the environment, and then use Blueprint to configure the individual routes.  For the JMS case, I’d normally expose the JMS Connection Factory through and OSGi service and then wire it into the RouteBuilder with Blueprint.

HTH

> On Sep 13, 2016, at 7:14 AM, DariusX <da...@gmail.com> wrote:
> 
> Check out this page of the documentation:
> http://camel.apache.org/configuring-camel.html
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-configurations-tp5787499p5787510.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMS Component configurations

Posted by DariusX <da...@gmail.com>.
Check out this page of the documentation:
http://camel.apache.org/configuring-camel.html



--
View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-configurations-tp5787499p5787510.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: JMS Component configurations

Posted by Steve Huston <sh...@riverace.com>.
Put that info in a bean?

> -----Original Message-----
> From: dpravin [mailto:pravin.deshmukh@gmail.com]
> Sent: Monday, September 12, 2016 9:32 PM
> To: users@camel.apache.org
> Subject: JMS Component configurations
> 
> Hello All,
> 
> We are in process of implementing hundreds of routes that will use Camel.
> Many of the routes will use remote instance of AMQ, local AMQ or WMQ to
> process the messages. Each of the routes will have the same (connection
> pooling) code/configuration repeated to connect to any one of these
> resources. Is there any solution that can reduce this boiler plate
> code/configuration.
> 
> Thanks,
> Pravin
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMS-
> Component-configurations-tp5787499.html
> Sent from the Camel - Users mailing list archive at Nabble.com.