Hi all,
In our solution we've developed a servicemix listeners that basically
take the exchange received by servicemix,
and serialize an then send to a jms message queue.
To do this we've declared the listener in servicemix.xml file as follow:
...
<!-- Spagic: JMS factory for monitor listener -->
<bean id="spagicJmsFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName"
value="java:comp/env/jms/SpagicJmsConnectionFactory"/>
</bean>
<monitoringListeners:AuditingExchangeASyncListener>
<property name="connectionFactory" ref="spagicJmsFactory"/>
<property name="destinationQueue" ref="smxMonitorQueue"/>
</monitoringListeners:AuditingExchangeASyncListener>
in the jndi.xml we've declared the spagicJmsFactory as follow:
<entry key="java:comp/env/jms/SpagicJmsConnectionFactory">
<amq:connectionFactory brokerURL="${activemq.url}" />
</entry>
and in the activemq.xml file the queue is declared as:
<amq:queue id="smxMonitorQueue"
physicalName="org.spagic.monitor.SMXQueue"/>
With this configuration in a "production environment i'm getting " an
exceptio saying " Channel was inactive for too long"
this happen when in my listener code i'm getting and using the
queueconnection.
Is it possible to check a connection to see if it's active before using
it???? Any idea??
16:04:12,609 | ERROR | pool-component.spagic-jdbc-thread-101 |
ingExchangeASyncListener | .AuditingExchangeASyncListener 148 |
org.apache.activemq.ConnectionFailedException: The JMS connection has
failed: Channel was inactive for too long: localhost/127.0.0.1:61616