APAR status
Closed as program error.
Error description
An MQ JMS connection factory is configured with the following properties set: - CLIENTRECONNECTOPTIONS=ANY - CLIENTRECONNECTTIMEOUT=30 An MQ 9.1 classes for JMS application uses the connection factory to connect to a queue manager. After it has connected, the application creates a JMS MessageConsumer for a queue called TEST.QUEUE hosted on the queue manager, and calls the method MessageConsumer.receive() to get messages from it. After the application has been running for a while, the queue manager is stopped using the command: endmqm -r <queue manager name> 30 seconds later, the MQ 9.1 classes for JMS have not reconnected to the queue manager and the following JMSException is thrown back to the application: JMSWMQ2002: Failed to get a message from destination 'TEST.QUEUE'. IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error. Use the linked exception to determine the cause of this error. at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException( Reason.java:595) at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:215) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:222) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:156) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1862) at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt ernal(WMQSyncConsumerShadow.java:230) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon sumerShadow.java:1467) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe ssageConsumer.java:674) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn boundMessage(JmsMessageConsumerImpl.java:1073) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(J msMessageConsumerImpl.java:489) at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java: 179) ... Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2556' ('MQRC_RECONNECT_TIMED_OUT'). at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:203) ... 10 more The application is then reconfigured to use the MQ 9.2 classes for JMS, and the test described above is re-run. However, 30 seconds after the queue manager has been stopped using the command: endmqm -r <queue manager name> the MQ 9.2 classes for JMS throw the following JMSException back to the application: JMSWMQ2002: Failed to get a message from destination 'TEST.QUEUE'. IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error. Use the linked exception to determine the cause of this error. at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException( Reason.java:595) at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:215) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:222) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCall Success(WMQMessageConsumer.java:156) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQCons umerShadow.java:1858) at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInt ernal(WMQSyncConsumerShadow.java:228) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQCon sumerShadow.java:1461) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMe ssageConsumer.java:674) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveIn boundMessage(JmsMessageConsumerImpl.java:1051) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(J msMessageConsumerImpl.java:465) at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java: 179) .... Caused by: com.ibm.mq.MQException: JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN'). at com.ibm.msg.client.wmq.common.internal.Reason.createException(Re ason.java:203) ... 10 more The MQ reason code mentioned in the MQException contained within the JMSException is incorrect. The reason code should be 2556 (MQRC_RECONNECT_TIMED_OUT) and not 2009 (MQRC_CONNECTION_BROKEN).
Local fix
Problem summary
**************************************************************** USERS AFFECTED: This issue affects users of the MQ 9.2 classes for JMS, who have applications that use automatic client reconnection when connecting to a queue manager. Platforms affected: MultiPlatform **************************************************************** PROBLEM DESCRIPTION: When using the automatic client reconnection functionality from a JMS application, the Connection Factory property: CLIENTRECONNECTTIMEOUT specifies how long the MQ classes for JMS should attempt to reconnect a connection to a queue manager before timing out and throwing a JMSException back to the application. The default value of the property is 1800 seconds, which is 30 minutes. When using the MQ 9.1 classes for JMS, if a connection has not been reconnected in the timeout period specified by the CLIENTRECONNECTTIMEOUT property, then a JMSException that included an MQException containing reason code 2556 (MQRC_RECONNECT_TIMED_OUT) would be thrown back to the application. However, due to some internal refactoring that took place, the MQ 9.2 classes for JMS were incorrectly changed to throw a JMSException that included an MQException containing reason code 2009 (MQRC_CONNECTION_BROKEN) back to the application if an automatic client reconnection attempt timed out.
Problem conclusion
To resolve this issue, the MQ 9.2 classes for JMS have been updated to throw a JMSException that includes an MQException containing reason code 2556 (MQRC_RECONNECT_TIMED_OUT) if an automatic client reconnection attempt times out. --------------------------------------------------------------- The fix is targeted for delivery in the following PTFs: Version Maintenance Level v9.2 LTS 9.2.0.5 v9.x CD 9.2.5 The latest available maintenance can be obtained from 'WebSphere MQ Recommended Fixes' http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037 If the maintenance level is not yet available information on its planned availability can be found in 'WebSphere MQ Planned Maintenance Release Dates' http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309 ---------------------------------------------------------------
Temporary fix
Comments
APAR Information
APAR number
IT38118
Reported component name
MQ BASE V9.2
Reported component ID
5724H7281
Reported release
920
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2021-08-24
Closed date
2021-11-08
Last modified date
2021-11-08
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
MQ BASE V9.2
Fixed component ID
5724H7281
Applicable component levels
[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"920"}]
Document Information
Modified date:
09 November 2021