Hi,
I have an exceptionlistener like this :
if ((ex.getLinkedException() instanceof java.io.EOFException) || (ex.getLinkedException() instanceof IOException)) {
try {
connection.setExceptionListener(null);
session.close();
connection.close();
} catch (JMSException e) {
e.printStackTrace();
}
wait(60000);
reconnect();
Your code is wrong.
If either setExceptionListener() or session.close() fails (throws an exception),
you bypass connection.close().