|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Closing session/connection blocks? |
« View previous topic :: View next topic » |
Author |
Message
|
steffi2 |
Posted: Wed Sep 30, 2009 10:06 am Post subject: Closing session/connection blocks? |
|
|
Apprentice
Joined: 04 Sep 2009 Posts: 31
|
So I'm testing my application's ability to reestabilish it's connection to the queue manager. I notice that when I get my server guy to kick me off the queue I get a
E_JMS_CONNECTION_PROBLEM clientId: null : MQJMS2002: failed to get message from MQ queue; nested exception is
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2202javax.jms.JMSException: MQJMS2002: failed to get message from MQ queue at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:540)
at com.ibm.mq.jms.MQQueueReceiver.getMessage(MQQueueReceiver.java:1730) at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:828) at com.ibm.mq.jms.contact admin.run(contact admin.java:401)
at java.lang.Thread.run(Thread.java:637)
and my ExceptionListener does
JMSUtilities.close(receiver, log);
//JMSUtilities.close(session, log);
//JMSUtilities.close(connection, true, log);
if I try to close the session or the connection I JMS will block and the async delivery thread doesn't go any further. So I can currently
reestabilish connectivity by not doing that but where is the documentation that says that I shouldn't close either session or connection? |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 30, 2009 7:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you checked the meaning of Reason Code 2202?
In any case you should stop the connection before setting a message listener to null. (way to remove it.)
You should also close the receiver, session, and connection.
This will prevent a connection leak.
Read up on standard JMS and JMS good practice. IIRC sun has a good JMSTutorial...
Have fun  _________________ MQ & Broker admin |
|
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
|
|
|
|