spring jms config for activemq
Here are some configuration hints for spring jms. This is backed by activemq jms provider.
A few comments:
Here are some configuration hints for spring jms. This is backed by activemq jms provider.
A few comments:
JavaServiceWrapper is a useful library that allows you to expose a java application as a windows Service. Note: 64bit install of JavaServiceWrapper is not free, you got pay ~75 per server.
JavaServiceWrapper can be monitored via JMX. The following code shows how to expose it through Spring configuration.
<bean id="wrapperManager" class="org.tanukisoftware.wrapper.jmx.WrapperManager" /> <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"> <property name="beans"> <map> <entry key="JavaServiceWrapper:service=WrapperManager" value-ref="wrapperManager" /> </map> </property> </bean>
The code examples on the ActiveMQ and Spring JMS sites use a straightforward jmsTemplate.receive() call. I found this to be very unstable. It would frequently leave orphaned messages in a queue that would never be picked up.
I moved to a DefaultMessageListenerContainer.java and most of my problems were solved. Here’s a sample code:
Powered by WordPress