After network connection failure and reconnect, fails to reestablish connection to a Websphere MQ queue.
aemcat May 9, 2010 1:23 PMNewbie troubles…
using JBoss SOA p.5.0.0
We have an ESB configured to read from 2 queues, one using a JBoss Messaging provider, the other using a Websphere MQ provider. The actual WMQ is remote.
The problem: When the network connection goes down, and is brought back up, it cannot reestablish the connection to the Websphere MQ queue.
I see the following messages even after the network connection is restored.
WARN [JmsGatewayListener] Error reconnecting to Queue, backing off for 32000 milliseconds
I increased the log level for the org.jboss.soa.esb.listeners to Trace and did receive some additional information:
19:15:14,247 DEBUG [JmsGatewayListener] JMS error on receive. Attempting JMS Destination reconnect.
javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:622)
at com.ibm.mq.jms.MQMessageConsumer.getMessage(MQMessageConsumer.java:3778)
……………..
19:15:14,247 DEBUG [JmsGatewayListener] JMSGateway isTransacted = false
19:15:14,247 DEBUG [JmsGatewayListener] Reconnecting to Queue
javax.jms.JMSException: MQJCA1018:Only one session per connection allowed.
at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:115)
at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:80)
at com.ibm.mq.connector.outbound.ConnectionWrapper.createSession(ConnectionWrapper.java:101)
at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool$JmsSessionPool$2.call(JmsConnectionPool.java:830)
at org.jboss.internal.soa.esb.rosetta.pooling.JmsConnectionPool$JmsSessionPool$2.call(JmsConnectionPool.java:821)
Currently the only resolution I have is to redeploy the ESB, but seems this connection should be able to be repaired without redeploying.
So far I’ve been unable to determine how to increase the number of sessions per connection, but am unsure that would be the correct solution anyway?
I have a feeling this is something very basic, maybe configuration settings, but after much googling and reading, I’m afraid I’m still clueless.
Please, can anyone provide some advice on this?
In addition, here are relevant parts of the configuration:
wmq-ds.xml
{code:xml}
<connection-factories>
<!-- JCA Connection factory definitions -->
<tx-connection-factory>
<jndi-name>/WebSphereMQConnectionFactory</jndi-name>
<xa-transaction />
<rar-name>wmq.jmsra.rar</rar-name>
<connection-definition>
javax.jms.ConnectionFactory
</connection-definition>
<!-- remote connection settings -->
<config-property>SYSTEM.DEF.SVRCONN</config-property>
<config-property>simba.na.acme.net</config-property>
<config-property>1414</config-property>
<config-property>QM_SIMBA</config-property>
<config-property>CLIENT</config-property>
<min-pool-size>1</min-pool-size>
<max-pool-size>20</max-pool-size>
</tx-connection-factory>
</connection-factories>
{code}
queue-service.xml
{code:xml}
<mbean code="org.jboss.resource.deployment.AdminObject"
name="jca.wmq:name=MY_INPUT_Q">
<attribute>
queue/MY.INPUT.Q
</attribute>
<depends optional-attribute-name="RARName">
jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'
</depends>
<attribute>javax.jms.Queue</attribute>
<attribute>
baseQueueManagerName=QM_SIMBA
baseQueueName=MY.INPUT.Q
</attribute>
</mbean>
{code}
jboss-esb.xml (snippets)
{code:xml}
…
<providers>
<jms-provider connection-factory="OrderedConnectionFactory">
<!-- . . . The various jboss messaging queues
</jms-provider>
<jms-provider connection-factory="java:/WebSphereMQConnectionFactory">
<jms-bus busid="wmq_input_gw_channel">
<jms-message-filter dest-name="queue/MY.INPUT.Q" dest-type="QUEUE" />
</jms-bus>
</jms-provider>
</providers>
…
<services>
<service
category="test" >
<listeners>
<jms-listener
busidref="jbm_input_gw_channel"
is-gateway="true"/>
<jms-listener
busidref=" wmq_input_gw_channel "
is-gateway="true"/>
<jms-listener
busidref="esb_input_channel"
is-gateway="false"/>
</listeners>
{code}