You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Gareth <ga...@gmail.com> on 2014/06/29 00:56:50 UTC

Registering My Own Connection Factory For The Karaf JMS Service

Hello,

I currently register my own JMS connection factories as services. It would
be nice if I could take
advantage of the new JMS command line tools in karaf (especially since the
activemq web console
has had problems for a long time with equinox - ugh).

I started playing around with the karaf jms tools and I see these service
parameters registered:

karaf@root()> ls javax.jms.ConnectionFactory
[javax.jms.ConnectionFactory]
-----------------------------
 osgi.service.blueprint.compname = pooledConnectionFactory
 name = jms-default
 osgi.jndi.service.name = jms/jms-default
 service.id = 1167
Provided by : 
 Bundle 168

To get my connection factory seen by the karaf jms tools, I assume I just
need to make sure that I have set osgi.jndi.service.name to "jms/<my
connection factory name>" in my service properties? Do these tools
explicitly require a pooled/cached connection factory...or it doesn't
matter?

thanks,
Gareth






--
View this message in context: http://karaf.922171.n3.nabble.com/Registering-My-Own-Connection-Factory-For-The-Karaf-JMS-Service-tp4033861.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Registering My Own Connection Factory For The Karaf JMS Service

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Gareth,

First of all, regarding ActiveMQ WebConsole with Equinox, I will work on 
it next week (I assigned the Jira to me a couple of days ago).

For your connection factory, you just have to register a 
javax.jms.ConnectionFactory service (for instance using blueprint).

The osgi.jndi.service.name is not required (it's required only if you 
plan to lookup the connection factory via JNDI, it's not required if you 
do a direct OSGi service lookup): the jms command display/manage the name:
- first using the osgi.jndi.service.name service property
- fallback to name service property
- fallback to Constants.SERVICE_ID (number) which is always define

It's not necessary a pooled connection factory.

Regards
JB

On 06/29/2014 12:56 AM, Gareth wrote:
> Hello,
>
> I currently register my own JMS connection factories as services. It would
> be nice if I could take
> advantage of the new JMS command line tools in karaf (especially since the
> activemq web console
> has had problems for a long time with equinox - ugh).
>
> I started playing around with the karaf jms tools and I see these service
> parameters registered:
>
> karaf@root()> ls javax.jms.ConnectionFactory
> [javax.jms.ConnectionFactory]
> -----------------------------
>   osgi.service.blueprint.compname = pooledConnectionFactory
>   name = jms-default
>   osgi.jndi.service.name = jms/jms-default
>   service.id = 1167
> Provided by :
>   Bundle 168
>
> To get my connection factory seen by the karaf jms tools, I assume I just
> need to make sure that I have set osgi.jndi.service.name to "jms/<my
> connection factory name>" in my service properties? Do these tools
> explicitly require a pooled/cached connection factory...or it doesn't
> matter?
>
> thanks,
> Gareth
>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Registering-My-Own-Connection-Factory-For-The-Karaf-JMS-Service-tp4033861.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

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