<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
JBoss auto reconnect issue with Websphere MQ
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/forum.khan">forum khan</a> in <i>JBoss ESB Development</i> - <a href="https://community.jboss.org/message/745359#745359">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi,</p><p>   Am facing JBoss auto reconnect issue with websphere MQ. Please let me know if any configuration setting needs to be done. I had raised this same question in messaging: <a class="" href="https://community.jboss.org/message/745338#745338">https://community.jboss.org/message/745338</a> thinking its a messaging issue.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>   Let me explain the scenario:</p><p>   1. I will be sending the messages to the JMS queue via the EJB which is delivered & processed successfully. In the mean time I will only stop the MQ server then it throws the exception marked in Red in the Jboss console.</p><p>   2. Next I will restart the MQ server. Exactly after 5 mins it display's the message it got reconnected successfully which is marked in Green.</p><p>   3. After it gets connected successfully again am able to send the messages successfully to the queue.</p><p>   4. Next I will disconnect/stopping MQ for the whole night without shutting down the JBOSS then next day morning I will restart the MQ  and send few messages. Now my JBOSS will not able to reconnect to MQ and nor be able to process the JMS messages.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>    Now I like to understand the below points</p><p>    1. How this is getting reconnected exactly after 5 mins, where is the configuration setting?</p><p>    2. It is observed that if i disconnect/stopping MQ for the whole night without shutting down the JBOSS then next day morning I will restart the MQ  and send few messages then now my JBOSS will not able to reconnect to MQ and nor be able to process the JMS messages. Here I like to understand after shutting down and restarting the MQ it used to connect automatically. But when its closed from the whole night, next day JBOSS is not able to identity the MQ. Is there any special configuration setting for this?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The below message is from the console.</p><p><strong>Console:</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>20:06:59,380 WARN  [HttpRouter] Received status code '302' on HTTP <a class="jive-link-external-small" href="mailto:org.apache.commons.httpclient.methods.PostMethod@a29bbd">org.apache.commons.httpclient.methods.PostMethod@a29bbd</a> request to '<a class="jive-link-external-small" href="http://localhost:8080/someservice" target="_blank">http://localhost:8080/someservice</a>.</p><p>20:09:02,441 INFO  [CNN_Connection_Factory] JMSCC3036:An exception has been delivered to the connections exception listener: '</p><p>                       <span style="color: #ff0000;">Message : com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ1107: A problem with this connection has occurred. An error has occurred with the WebSphere MQ JMS </span>connection. Use the linked exception to determine the cause of this error.</p><p>                         Class : class com.ibm.msg.client.jms.DetailedJMSException</p><p>                         Stack : com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:608)</p><p>                               : com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236)</p><p>                               : com.ibm.msg.client.wmq.internal.WMQConnection.consumer(WMQConnection.java:823)</p><p>                               : com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.callEventHandler(RemoteAsyncConsume.java:1018)</p><p>                               : com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.driveEventsEH(RemoteAsyncConsume.java:1376)</p><p>                               : com.ibm.mq.jmqi.remote.internal.RemoteDispatchThread.run(RemoteDispatchThread.java:309)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298)</p><p>                               : com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220)</p><p>     Caused by [1] --> <span style="color: #ff0000;">Message : com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN').</span></p><p>                         Class : class com.ibm.mq.MQException</p><p>                         Stack : com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223)</p><p>                               : com.ibm.msg.client.wmq.internal.WMQConnection.consumer(WMQConnection.java:823)</p><p>                               : com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.callEventHandler(RemoteAsyncConsume.java:1018)</p><p>                               : com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.driveEventsEH(RemoteAsyncConsume.java:1376)</p><p>                               : com.ibm.mq.jmqi.remote.internal.RemoteDispatchThread.run(RemoteDispatchThread.java:309)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224)</p><p>                               : com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298)</p><p>                               : com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220)</p><p>'.</p><p>20:09:02,441 INFO  [CNN_Connection_Factory] MQJCA4013:A connection to a queue manager failed for activationSpec 'javax.jms.Queue:CNN<a class="" href="https://community.jboss.org/mailto:_Gateway@QM_GIS01234">_Gateway@QM_GIS01234</a> <3852704>'. Check the queue manager error logs for details.</p><p>20:09:17,441 INFO  [CNN_Connection_Factory] MQJCA4003:A recoverable exception occurred in the JMS layer: 'JMSCMQ0002: The method 'MQCTL' failed.'</p><p>20:09:17,441 INFO  [CNN_Connection_Factory] MQJCA4003:A recoverable exception occurred in the JMS layer: 'JMSWMQ0019: Failed to disconnect from queue manager 'QM_GIS01234' using connection mode '1' and host name 'gis01234.cloud.abc.com(1414)'.'</p><p><span style="color: #008000;"><strong>20:14:21,687 INFO  [CNN_Connection_Factory] MQJCA4019:ActivationSpec 'javax.jms.Queue:CNN_Gateway@QM_GIS01234<3852704>' reconnected successfully.</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>We are using JMS with EJB 3.0. The queues are being configured in JBOSS 5.0. The message processing is done in ESB, now it looks like i have posted this message in the right window.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The JMS configuration is done in wmq.jmsra-ds.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><connection-factories><br/>  <tx-connection-factory><br/>    <jndi-name>CNN_Connection_Factory</jndi-name><br/>    <xa-transaction /><br/>    <rar-name>wmq.jmsra.rar</rar-name></p><p>    <connection-definition>javax.jms.ConnectionFactory</connection-definition></p><p>    <config-property name="channel" type="java.lang.String">someChannel</config-property><br/>    <config-property name="hostName" type="java.lang.String">GIS01234.cloud.abc.com</config-property>  </p><p>    <config-property name="port" type="java.lang.String">5678</config-property><br/>    <config-property name="queueManager" type="java.lang.String">QM_GIS5678</config-property><br/>    <config-property name="transportType" type="java.lang.String">CLIENT</config-property><br/>    <security-domain-and-application>JmsXARealm</security-domain-and-application><br/>  </tx-connection-factory></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>  <mbean code="org.jboss.resource.deployment.AdminObject" name="jca.wmq:name=cnngateway"><br/>    <attribute name="JNDIName">CNN_Gateway</attribute><br/>    <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends><br/>    <attribute name="Type">javax.jms.Queue</attribute><br/>    <attribute name="Properties"><br/>      baseQueueManagerName=QM_GIS01234<br/>      baseQueueName=CNN_Queue</p><p>    </attribute><br/>  </mbean><br/></connection-factories></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #008000;"><strong>Thanks in Advance</strong></span></p><p><span style="color: #008000;"><strong>KK</strong></span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/745359#745359">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss ESB Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2032">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>