git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@813053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2009-09-09 17:15:48 +00:00
parent c7c29e960a
commit eae5aa09d1
2 changed files with 10 additions and 0 deletions

View File

@ -120,6 +120,7 @@ public class PooledSession implements Session, TopicSession, QueueSession, XASes
LOG.trace("Ignoring exception as discarding session: " + e1, e1); LOG.trace("Ignoring exception as discarding session: " + e1, e1);
} }
session = null; session = null;
sessionPool.invalidateSession(this);
return; return;
} }
} }

View File

@ -70,6 +70,15 @@ public class SessionPool implements PoolableObjectFactory {
} }
} }
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 // PoolableObjectFactory methods
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
public Object makeObject() throws Exception { public Object makeObject() throws Exception {