-
Nov 30th, 2009, 02:25 PM
#1
Spring JMS Listener and Tomcat
hi everybody,
I'm having a problem when running Spring 2.5 over Tomcat 6 and HornetQ. A JMS listener like this:
<bean id="receiveQueue" class="org.springframework.jndi.JndiObjectFactoryB ean" lazy-init="true">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName" value="/queue/TEMQueue" />
</bean>
<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean" lazy-init="true">
<property name="jndiTemplate">
<ref bean="jndiTemplate" />
</property>
<property name="jndiName">
<value>/ConnectionFactory</value>
</property>
</bean>
<bean id="queueListenerContainer" class="org.springframework.jms.listener.DefaultMes sageListenerContainer">
<property name="connectionFactory" ref="connectionFactory" />
<property name="destination" ref="receiveQueue"/>
<property name="messageListener" ref="syncronizationConsumer" /><!-- MY BEAN WITH ONMESSAGE METHOD -->
</bean>
The problem is that when I start Tomcat all works fine. The message are read and the onMessage method is called, but if I shutdown Tomcat and restart it, the listener can't read messages anymore. And the same code in a stand alone application works fine. Does anyone have any idea ?
Thanks in advance,
Sergio Stateri Jr.
sergio.stateri@globo.com
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules