mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@813053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c7c29e960a
commit
eae5aa09d1
|
@ -120,6 +120,7 @@ public class PooledSession implements Session, TopicSession, QueueSession, XASes
|
|||
LOG.trace("Ignoring exception as discarding session: " + e1, e1);
|
||||
}
|
||||
session = null;
|
||||
sessionPool.invalidateSession(this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,15 @@ public class SessionPool implements PoolableObjectFactory {
|
|||
throw JMSExceptionSupport.create("Failed to return session to pool: " + e, e);
|
||||
}
|
||||
}
|
||||
|
||||
public void invalidateSession(PooledSession session) throws JMSException {
|
||||
try {
|
||||
getSessionPool().invalidateObject(session);
|
||||
} catch (Exception e) {
|
||||
throw JMSExceptionSupport.create("Failed to invalidate session: " + e, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// PoolableObjectFactory methods
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue