JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)

2020-01-06 Thread Gerald Kallas
Dear community,

I'm currently configuring the JMS connection factory within a blueprint XML like








Could this be done in one of the config files in etc folder for the whole 
instance of Karaf/Camel?

Any hints are helpful, tx in advance.

Best
- Gerald

RE: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)

2020-01-06 Thread k.j.chernov
Hi.

That's how I did it (with artemis, though I suppose it would be the same with 
the activemq):
feature:repo-add mvn:org.apache.activemq/artemis-features/2.10.1/xml/features
feature:install -u -r pax-jms-artemis pax-jms-pool pax-jms-config jms

Then create a etc/org.ops4j.connectionfactory-default.cfg (default is the 
"name" of the instance), changing the parameters as you need:
connectionFactoryType = ConnectionFactory
jms.url = tcp://localhost:61616
jms.user = karaf
jms.password = karaf
osgi.jndi.service.name = mq/default
type = artemis

Later on, you can reference the ConnectionFactory in blueprint xml:


But if you want to expose a org.apache.activemq.ActiveMQConnectionFactory, from 
my point of view there's two options:
1. Register it using the blueprint as a service and reference it in other 
blueprints/bundles/...
2. Create a bundle, that registers a ManagedServiceFactory/ManagedService, 
which will create and register an instance of ActiveMQConnectionFactory with 
the parameters from the Configuration Admin (that come from the cfg file).

-Original Message-
From: Gerald Kallas  
Sent: Monday, January 6, 2020 3:24 PM
To: users@camel.apache.org
Subject: JMS connection pooling configuration instance wide in Camel 3.0.0 
(Karaf 4.2.7)

Dear community,

I'm currently configuring the JMS connection factory within a blueprint XML like



   


Could this be done in one of the config files in etc folder for the whole 
instance of Karaf/Camel?

Any hints are helpful, tx in advance.

Best
- Gerald



Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)

2020-01-06 Thread Jean-Baptiste Onofré
Hi,

Yes, simply use the jms feature: it will use pax-jms that use a managed
service with configuration backend.

You have a full JMS example in Karaf distribution:

https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35

Regards
JB

On 06/01/2020 09:24, Gerald Kallas wrote:
> Dear community,
> 
> I'm currently configuring the JMS connection factory within a blueprint XML 
> like
> 
> 
>  class="org.apache.activemq.ActiveMQConnectionFactory">
> 
> 
> 
> 
> 
> Could this be done in one of the config files in etc folder for the whole 
> instance of Karaf/Camel?
> 
> Any hints are helpful, tx in advance.
> 
> Best
> - Gerald
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)

2020-01-06 Thread Gerald Kallas
Thanks, JB.

I tried these commands ..

karaf@root()> feature:repo-add hawtio 2.8.0
Adding feature url mvn:io.hawt/hawtio-karaf/2.8.0/xml/features
karaf@root()> feature:repo-add activemq 5.15.11
Adding feature url mvn:org.apache.activemq/activemq-karaf/5.15.11/xml/features
karaf@root()> feature:repo-add camel 3.0.0
Adding feature url mvn:org.apache.camel.karaf/apache-camel/3.0.0/xml/features
karaf@root()> feature:install webconsole hawtio activemq-broker pax-jms-config 
pax-jms-activemq jms
karaf@root()> jms:create -t activemq --url tcp://localhost:61616 -u karaf -p 
karaf activemq
karaf@root()> jms:info -u karaf -p karaf activemq
Property │ Value
─┼─
product  │ ActiveMQ
version  │ 5.15.11
karaf@root()> feature:install camel
karaf@root()> jms:info -u karaf -p karaf activemq
Property │ Value
─┼─
product  │ ActiveMQ
version  │ 5.15.11
karaf@root()> feature:install camel-activemq
karaf@root()> jms:info -u karaf -p karaf activemq
Error executing command: No JMS connection factory found for activemq
karaf@root()>

It seems that after the feature install of camel-activemq the jms references 
are not working anymore. I tried also the same with the pax-jms feature, same 
behaviour.

Best
- Gerald

> Jean-Baptiste Onofré  hat am 6. Januar 2020 um 11:05 
> geschrieben:
> 
> 
> Hi,
> 
> Yes, simply use the jms feature: it will use pax-jms that use a managed
> service with configuration backend.
> 
> You have a full JMS example in Karaf distribution:
> 
> https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35
> 
> Regards
> JB
> 
> On 06/01/2020 09:24, Gerald Kallas wrote:
> > Dear community,
> > 
> > I'm currently configuring the JMS connection factory within a blueprint XML 
> > like
> > 
> > 
> >  > class="org.apache.activemq.ActiveMQConnectionFactory">
> > 
> > 
> > 
> > 
> > 
> > Could this be done in one of the config files in etc folder for the whole 
> > instance of Karaf/Camel?
> > 
> > Any hints are helpful, tx in advance.
> > 
> > Best
> > - Gerald
> > 
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)

2020-01-06 Thread Jean-Baptiste Onofré
Hi Gerald,

That's probably because camel-jms comes with JMS 2.0 whereas ActiveMQ is
still JMS 1.0.

You have to check if you have both JMS version in there.

Regards
JB

On 06/01/2020 13:12, Gerald Kallas wrote:
> Thanks, JB.
> 
> I tried these commands ..
> 
> karaf@root()> feature:repo-add hawtio 2.8.0
> Adding feature url mvn:io.hawt/hawtio-karaf/2.8.0/xml/features
> karaf@root()> feature:repo-add activemq 5.15.11
> Adding feature url mvn:org.apache.activemq/activemq-karaf/5.15.11/xml/features
> karaf@root()> feature:repo-add camel 3.0.0
> Adding feature url mvn:org.apache.camel.karaf/apache-camel/3.0.0/xml/features
> karaf@root()> feature:install webconsole hawtio activemq-broker 
> pax-jms-config pax-jms-activemq jms
> karaf@root()> jms:create -t activemq --url tcp://localhost:61616 -u karaf -p 
> karaf activemq
> karaf@root()> jms:info -u karaf -p karaf activemq
> Property │ Value
> ─┼─
> product  │ ActiveMQ
> version  │ 5.15.11
> karaf@root()> feature:install camel
> karaf@root()> jms:info -u karaf -p karaf activemq
> Property │ Value
> ─┼─
> product  │ ActiveMQ
> version  │ 5.15.11
> karaf@root()> feature:install camel-activemq
> karaf@root()> jms:info -u karaf -p karaf activemq
> Error executing command: No JMS connection factory found for activemq
> karaf@root()>
> 
> It seems that after the feature install of camel-activemq the jms references 
> are not working anymore. I tried also the same with the pax-jms feature, same 
> behaviour.
> 
> Best
> - Gerald
> 
>> Jean-Baptiste Onofré  hat am 6. Januar 2020 um 11:05 
>> geschrieben:
>>
>>
>> Hi,
>>
>> Yes, simply use the jms feature: it will use pax-jms that use a managed
>> service with configuration backend.
>>
>> You have a full JMS example in Karaf distribution:
>>
>> https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35
>>
>> Regards
>> JB
>>
>> On 06/01/2020 09:24, Gerald Kallas wrote:
>>> Dear community,
>>>
>>> I'm currently configuring the JMS connection factory within a blueprint XML 
>>> like
>>>
>>> 
>>> >> class="org.apache.activemq.ActiveMQConnectionFactory">
>>> 
>>> 
>>> 
>>> 
>>>
>>> Could this be done in one of the config files in etc folder for the whole 
>>> instance of Karaf/Camel?
>>>
>>> Any hints are helpful, tx in advance.
>>>
>>> Best
>>> - Gerald
>>>
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbono...@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com


Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)

2020-01-06 Thread Gerald Kallas
Thanks JB.

@Camel folks, any comments on this question from JB?

Thanks
- Gerald

> Jean-Baptiste Onofré  hat am 6. Januar 2020 um 13:15 
> geschrieben:
> 
> 
> Hi Gerald,
> 
> That's probably because camel-jms comes with JMS 2.0 whereas ActiveMQ is
> still JMS 1.0.
> 
> You have to check if you have both JMS version in there.
> 
> Regards
> JB
> 
> On 06/01/2020 13:12, Gerald Kallas wrote:
> > Thanks, JB.
> > 
> > I tried these commands ..
> > 
> > karaf@root()> feature:repo-add hawtio 2.8.0
> > Adding feature url mvn:io.hawt/hawtio-karaf/2.8.0/xml/features
> > karaf@root()> feature:repo-add activemq 5.15.11
> > Adding feature url 
> > mvn:org.apache.activemq/activemq-karaf/5.15.11/xml/features
> > karaf@root()> feature:repo-add camel 3.0.0
> > Adding feature url 
> > mvn:org.apache.camel.karaf/apache-camel/3.0.0/xml/features
> > karaf@root()> feature:install webconsole hawtio activemq-broker 
> > pax-jms-config pax-jms-activemq jms
> > karaf@root()> jms:create -t activemq --url tcp://localhost:61616 -u karaf 
> > -p karaf activemq
> > karaf@root()> jms:info -u karaf -p karaf activemq
> > Property │ Value
> > ─┼─
> > product  │ ActiveMQ
> > version  │ 5.15.11
> > karaf@root()> feature:install camel
> > karaf@root()> jms:info -u karaf -p karaf activemq
> > Property │ Value
> > ─┼─
> > product  │ ActiveMQ
> > version  │ 5.15.11
> > karaf@root()> feature:install camel-activemq
> > karaf@root()> jms:info -u karaf -p karaf activemq
> > Error executing command: No JMS connection factory found for activemq
> > karaf@root()>
> > 
> > It seems that after the feature install of camel-activemq the jms 
> > references are not working anymore. I tried also the same with the pax-jms 
> > feature, same behaviour.
> > 
> > Best
> > - Gerald
> > 
> >> Jean-Baptiste Onofré  hat am 6. Januar 2020 um 11:05 
> >> geschrieben:
> >>
> >>
> >> Hi,
> >>
> >> Yes, simply use the jms feature: it will use pax-jms that use a managed
> >> service with configuration backend.
> >>
> >> You have a full JMS example in Karaf distribution:
> >>
> >> https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35
> >>
> >> Regards
> >> JB
> >>
> >> On 06/01/2020 09:24, Gerald Kallas wrote:
> >>> Dear community,
> >>>
> >>> I'm currently configuring the JMS connection factory within a blueprint 
> >>> XML like
> >>>
> >>> 
> >>>  >>> class="org.apache.activemq.ActiveMQConnectionFactory">
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>> Could this be done in one of the config files in etc folder for the whole 
> >>> instance of Karaf/Camel?
> >>>
> >>> Any hints are helpful, tx in advance.
> >>>
> >>> Best
> >>> - Gerald
> >>>
> >>
> >> -- 
> >> Jean-Baptiste Onofré
> >> jbono...@apache.org
> >> http://blog.nanthrax.net
> >> Talend - http://www.talend.com
> 
> -- 
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: JMS connection pooling configuration instance wide in Camel 3.0.0 (Karaf 4.2.7)

2020-01-06 Thread Jean-Baptiste Onofré
Hi Gerald,

Let me prepare/update Karaf 4.3.0-SNAPSHOT examples with Camel 3.0.0.

I keep you posted.

Regards
JB

On 06/01/2020 13:39, Gerald Kallas wrote:
> Thanks JB.
> 
> @Camel folks, any comments on this question from JB?
> 
> Thanks
> - Gerald
> 
>> Jean-Baptiste Onofré  hat am 6. Januar 2020 um 13:15 
>> geschrieben:
>>
>>
>> Hi Gerald,
>>
>> That's probably because camel-jms comes with JMS 2.0 whereas ActiveMQ is
>> still JMS 1.0.
>>
>> You have to check if you have both JMS version in there.
>>
>> Regards
>> JB
>>
>> On 06/01/2020 13:12, Gerald Kallas wrote:
>>> Thanks, JB.
>>>
>>> I tried these commands ..
>>>
>>> karaf@root()> feature:repo-add hawtio 2.8.0
>>> Adding feature url mvn:io.hawt/hawtio-karaf/2.8.0/xml/features
>>> karaf@root()> feature:repo-add activemq 5.15.11
>>> Adding feature url 
>>> mvn:org.apache.activemq/activemq-karaf/5.15.11/xml/features
>>> karaf@root()> feature:repo-add camel 3.0.0
>>> Adding feature url 
>>> mvn:org.apache.camel.karaf/apache-camel/3.0.0/xml/features
>>> karaf@root()> feature:install webconsole hawtio activemq-broker 
>>> pax-jms-config pax-jms-activemq jms
>>> karaf@root()> jms:create -t activemq --url tcp://localhost:61616 -u karaf 
>>> -p karaf activemq
>>> karaf@root()> jms:info -u karaf -p karaf activemq
>>> Property │ Value
>>> ─┼─
>>> product  │ ActiveMQ
>>> version  │ 5.15.11
>>> karaf@root()> feature:install camel
>>> karaf@root()> jms:info -u karaf -p karaf activemq
>>> Property │ Value
>>> ─┼─
>>> product  │ ActiveMQ
>>> version  │ 5.15.11
>>> karaf@root()> feature:install camel-activemq
>>> karaf@root()> jms:info -u karaf -p karaf activemq
>>> Error executing command: No JMS connection factory found for activemq
>>> karaf@root()>
>>>
>>> It seems that after the feature install of camel-activemq the jms 
>>> references are not working anymore. I tried also the same with the pax-jms 
>>> feature, same behaviour.
>>>
>>> Best
>>> - Gerald
>>>
 Jean-Baptiste Onofré  hat am 6. Januar 2020 um 11:05 
 geschrieben:


 Hi,

 Yes, simply use the jms feature: it will use pax-jms that use a managed
 service with configuration backend.

 You have a full JMS example in Karaf distribution:

 https://github.com/apache/karaf/blob/master/examples/karaf-jms-example/karaf-jms-example-features/src/main/feature/feature.xml#L35

 Regards
 JB

 On 06/01/2020 09:24, Gerald Kallas wrote:
> Dear community,
>
> I'm currently configuring the JMS connection factory within a blueprint 
> XML like
>
> 
>  class="org.apache.activemq.ActiveMQConnectionFactory">
> 
> 
> 
> 
>
> Could this be done in one of the config files in etc folder for the whole 
> instance of Karaf/Camel?
>
> Any hints are helpful, tx in advance.
>
> Best
> - Gerald
>

 -- 
 Jean-Baptiste Onofré
 jbono...@apache.org
 http://blog.nanthrax.net
 Talend - http://www.talend.com
>>
>> -- 
>> Jean-Baptiste Onofré
>> jbono...@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com