Commit 44448f07 authored by Nicolas Tachker's avatar Nicolas Tachker
Browse files

JORAM-253: Don't close the session on OutboundSession.close method, this...

JORAM-253: Don't close the session on OutboundSession.close method, this session is shared by all the outbound sessions.
This session will be closed on outboud connection close.
parent a5816d43
......@@ -478,6 +478,13 @@ public class ManagedConnectionImpl
handle = (OutboundConnection) it.next();
handle.cleanup();
}
try {
if (session != null)
session.close();
} catch (JMSException e) {
if (logger.isLoggable(BasicLevel.WARN))
logger.log(BasicLevel.WARN, e);
}
session = null;
try {
// Clear the handles.
......
......@@ -423,8 +423,11 @@ public class OutboundSession implements javax.jms.Session {
cnx.sessions.remove(this);
started = false;
// close the joram session, need by spring
((org.objectweb.joram.client.jms.Session)sess).close();
/*
* This session is shared by all the outbound sessions.
* This session will be closed on outboud connection close.
*/
sess = null;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment