You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Rama Casturi <rc...@transdyn.com> on 2007/04/03 06:56:06 UTC

Register ActiveMQ destinations in JNDI

I am new to using ActiveMQ. I am trying to integrate ActiveMQ in our Spring
application environment. I have been successful in running the broker
(defined in the activemq.xml file on the classpath) in the embedded form as
a spring bean in our application context. I am also able to create a
connection factory bean using ActiveMQConnectionFactory as well as
destination bean using the ActiveMQTopic classes as spring beans. I also am
able to produce JMS messages and publish to my topic and also consume those
messages (both producer and consumer are configured as spring beans using
Spring's JMS support classes).

Now I want to be able to configure the connection factory and my
destinations in such a way that  I donot have to use the ActiveMQ specific
classes in my spring bean definitions. I want to be able to JNDI to
configure these objects and then discover them in my spring application
using spring's JndiObjectFactoryBean.

I am trying to understand the use of the jndi.properties file, but cannot
see where it is used and who uses it to instantiate and bind those objects
in JNDI.

I would appreciate any help on this subject.
-- 
View this message in context: http://www.nabble.com/Register-ActiveMQ-destinations-in-JNDI-tf3509788s2354.html#a9803636
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Register ActiveMQ destinations in JNDI

Posted by James Strachan <ja...@gmail.com>.
On 4/3/07, Rama Casturi <rc...@transdyn.com> wrote:
>
> I am new to using ActiveMQ. I am trying to integrate ActiveMQ in our Spring
> application environment. I have been successful in running the broker
> (defined in the activemq.xml file on the classpath) in the embedded form as
> a spring bean in our application context. I am also able to create a
> connection factory bean using ActiveMQConnectionFactory as well as
> destination bean using the ActiveMQTopic classes as spring beans. I also am
> able to produce JMS messages and publish to my topic and also consume those
> messages (both producer and consumer are configured as spring beans using
> Spring's JMS support classes).
>
> Now I want to be able to configure the connection factory and my
> destinations in such a way that  I donot have to use the ActiveMQ specific
> classes in my spring bean definitions.

You mean you want to avoid ActiveMQ classes in your spring.xml? Why?
There's no ActiveMQ packages in your source code, surely thats enough?


> I want to be able to JNDI to
> configure these objects and then discover them in my spring application
> using spring's JndiObjectFactoryBean.

I really don't see the point of adding another level of indirection; a
spring.xml is enough IMHO


> I am trying to understand the use of the jndi.properties file, but cannot
> see where it is used and who uses it to instantiate and bind those objects
> in JNDI.
>
> I would appreciate any help on this subject.

See the following for how to configure an ActiveMQ JNDI context
http://activemq.apache.org/jndi-support.html

-- 

James
-------
http://radio.weblogs.com/0112098/