Hi,
I close the subscriber and associated session , connection etc by calling
public static void stop() throws JMSException {
if (topicSession != null){
topicSession.close();
}
if (topicConnection != null){
topicConnection.stop();
topicConnection.close();
}
}
Everytime I am being thrown with following messages ,
(mq.SpyMessageConsumer 736 ) Message consumer closing due to error in listening thread.
javax.jms.IllegalStateException: Session is closed.
at org.jboss.mq.SpyMessage.doAcknowledge(SpyMessage.java:319)
at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:728)
at java.lang.Thread.run(Thread.java:534)
(mq.Connection 460 ) Connection failure, use javax.jms.Connection.setExceptionListener() to handle this error and reconnect
javax.jms.IllegalStateException: Session is closed.
at org.jboss.mq.SpyMessage.doAcknowledge(SpyMessage.java:319)
at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:728)
at java.lang.Thread.run(Thread.java:534)
This looks like a warning message. Is this a bug?
Thanks
Sundar
No. If you do consumer.close(); before session.close()
you won't see this message.