|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
IllegalStateException - connection closed. |
« View previous topic :: View next topic » |
Author |
Message
|
mkurley |
Posted: Thu Feb 20, 2003 6:45 am Post subject: IllegalStateException - connection closed. |
|
|
Novice
Joined: 27 Mar 2002 Posts: 13
|
I am getting the IllegalStateException - connection closed exception. (See below) Currently, we implemented our own JMS Connection Pool which pools just the QueueConnection objects. This has been running in a production environment for over 1 year now. With our current release in QA we are getting this exception.
(1) Question: is there a good way to test a connection before giving it to the client that requested the connection. The only methods that I see for the QueueConnection is a start and stop method. Will these fail if the connection is closed? If so then I can call these methods before returning the object.
(2) Question: Why would the connections start to closed with this release? We didn't change the MQSeries API's that we are using. We are still using the same code base and API's that were working before.
Thanks
Any comments??
****************** Exception ***************
Feb 18 08:11:11 2003: Failed to connect the to queue manager. Exception: MQJMS1004: connection closed
Feb 18 08:11:11 2003: javax.jms.IllegalStateException: MQJMS1004: connection closed
Feb 18 08:11:11 2003: at com.ibm.mq.jms.MQQueueConnection.createQueueSession(MQQueueConnection.java:257)
Feb 18 08:11:11 2003: at com.tpcx.log.bl.TPCXJMSAppender.init(TPCXJMSAppender.java:136)
Feb 18 08:11:11 2003: at com.tpcx.log.bl.TPCXJMSAppender.append(TPCXJMSAppender.java:89)
Feb 18 08:11:11 2003: at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
Feb 18 08:11:11 2003: at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
Feb 18 08:11:11 2003: at org.apache.log4j.Category.callAppenders(Category.java:190)
Feb 18 08:11:11 2003: at org.apache.log4j.Category.forcedLog(Category.java:375)
Feb 18 08:11:11 2003: at org.apache.log4j.Category.error(Category.java:289)
Feb 18 08:11:11 2003: at com.tpcx.util.logging.TPCXLogger.log(TPCXLogger.java:131)
Feb 18 08:11:11 2003: at com.tpcx.vmarket.bl.VerticalMarketServicesBean.getVerticalMarketsForTP(VerticalMarketServicesBean.java:137)
Feb 18 08:11:11 2003: at com.tpcx.vmarket.bl._sk_TPCXJava_VerticalMarketServices.invoke(_sk_TPCXJava_VerticalMarketServices.java:222)
Feb 18 08:11:11 2003: Failed to send a message to the queue. Exception : java.lang.NullPointerException: |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Feb 20, 2003 7:15 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Double-check that you have the same level of MQ on your development system and your QA system. I've seen problems like this when your queue manager isn't at the latest CSD. |
|
Back to top |
|
 |
kingdon |
Posted: Fri Feb 21, 2003 1:07 am Post subject: |
|
|
Acolyte
Joined: 14 Jan 2002 Posts: 63 Location: UK
|
Hmm, the specific Exception shown is handled entirely in the JMS layer, based on a private variable in the MQConnection object. The only way I can see that that variable can be moved to the closed state is via the public Connection.close() method, and I can't find anywhere that the JMS code calls this on the users behalf. So it looks like the connection is closed because the application closed it. I'm guessing that to provide pooling you wrapper the JMS Connection and intercept the close call as the trigger to return the object to the pool, so it's a bit of a mystery how the close call got through to the underlying object. Perhaps the best thing is to take a trace, which you could search to confirm that the MQConnection.close method is being called, and then work back up to see why it is being called.
Cheers,
James. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|