activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craigwarren <craig.war...@aquilauk.co.uk>
Subject Configuring Destinations in activemq's JNDI initial Context
Date Thu, 22 Mar 2012 09:28:34 GMT
Hi,

I'm trying to create an application which uses JMS message queues, but in
order to support production and development environment I need to be able to
use both Apache ActiveMQ and Oracle AQ.

I use spring to do jndi lookups of the destinations... below is the configI
use when connecting to Oracle AQ:
<jee:jndi-lookup id="handlersDest"  jndi-name="handlersDest">
    <jee:environment>
        java.naming.factory.initial = weblogic.jndi.WLInitialContextFactory
        java.naming.provider.url = ${jndi.jms.naming.url}
        queue.handlersDest = t3://localhost:7001
    </jee:environment>
</jee:jndi-lookup> 

But when I connect to ActiveMQ I have to add an extra property to the
environment:
<jee:jndi-lookup id="handlersDest"  jndi-name=handlersDest>
    <jee:environment>
        java.naming.factory.initial =
org.apache.activemq.jndi.ActiveMQInitialContextFactory
        java.naming.provider.url = tcp://0.0.0.0:61616
        queue.handlersDest = handlersDest
    </jee:environment>
</jee:jndi-lookup> 

The extra property (queue.handlersDest = handlersDest) seems to be asking
activeMQ to put the queue physically named "handlersDest" in the jndi name
"queue.handlersDest". I want to know if there is any way this can be done in
advance, and not by the client using the destination.

Can I configured activemq.xml to pre-set this naming? I would rather not
have that property in my client application if I can avoid it.

Craig

--
View this message in context: http://activemq.2283324.n4.nabble.com/Configuring-Destinations-in-activemq-s-JNDI-initial-Context-tp4494989p4494989.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message