This session is closed. An application called a method that must not be used after the session is closed?
DetailedIllegalStateException: JMSCC0020
0%
[ 0 ]
This session is closed. An application called a method that must not be used after the session is closed
100%
[ 1 ]
Total Votes : 1
Author
Message
kasturi.s
Posted: Thu Jun 27, 2013 5:33 am Post subject: DetailedIllegalStateException: JMSCC0020
Newbie
Joined: 27 Jun 2013 Posts: 1
Hi,
Im getting this exception occationally after a few messages are successfully pushed to the queue. My code looks like this. Please suggest what can be done to avoid this error.
BytesMessage message = queueSession.createBytesMessage();
byte[] b = msg.getBytes();
message.writeBytes(b);
message.setJMSCorrelationID(correlationID);
message.setJMSExpiration(2000000);
message.setIntProperty("JMS_IBM_MsgType", com.ibm.mq.MQC.MQMT_REPLY);
queueSender.send(msg);
queueConnection.stop();
queueSender.close();
queueSession.close();
queueConnection.close();
Error:
com.ibm.msg.client.jms.DetailedIllegalStateException: JMSCC0020: This session is closed. An application called a method that must not be used after the session is closed.
Ensure that the session is not closed before calling the method.
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