IBM Support

Java application tries to reuse a session and gets javax.jms.IllegalStateException

Troubleshooting


Problem

You access WebSphere MQ V6.0 queues using JMS from a Java™ application which sits in EJB beans in WebSphere Application Server. The application has been running for a number of years with no errors, in WebSphere Application Server V5. You are now trying to run exactly the same Java application on WebSphere Application Server V6. The bean creates a connection to a queue. It then creates a session on this connection, using: queueSession = queueConnection.createQueueSession(transactional,Session.AUTO_ACKNOWLEDGE); It then creates a sender, and places a message on the queue. When access is completed, the session is closed, but the connection is left open for re-use. This is done for performance reasons.The application which is deployed on WebSphere Application Server V6 fails at the point when it tries to re-use a connection on the queue. The createQueueSession method fails, creating an associated ffdc log. The relevant section of the failing method stack from the ffdc log shows: javax.jms.IllegalStateException com.ibm.ejs.jms.JMSQueueConectionHandle.createQueueSession 159Exception = javax.jms.IllegalStateExceptionSource = com.ibm.ejs.jms.JMSQueueConnectionHandle.createQueueSessionprobeid = 159 Stack Dump = javax.jms.IllegalStateException: Connection closed at com.ibm.ejs.jms.JMSConnectionHandle.checkOpen(JMSConnectionHandle.java:671) at com.ibm.ejs.jms.JMSQueueConnectionHandle.createQueueSession( JMSQueueConnectionHandle.java:172) at com.littlewoods.enterprise.framework.services.AsyncPutterBean.getSession (Unknown Source) at com.littlewoods.enterprise.framework.services.AsyncPutterBean.GenericPut (Unknown Source)

[{"Product":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Component":"Java","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"6.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"EJB Container","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.1;6.0","Edition":"","Line of Business":{"code":"LOB77","label":"Automation Platform"}}]

To view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use the link to actual document below to access the full document. You will be asked to log on if you are not already logged in. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
WebSphere MQ

Software version:
6.0

Operating system(s):
AIX, HP-UX, Linux, Solaris

Document number:
350335

Modified date:
03 March 2025

UID

swg21267957