public class SessionPool extends Object implements org.apache.commons.pool.PoolableObjectFactory
| Constructor and Description |
|---|
SessionPool(ConnectionPool connectionPool,
SessionKey key,
org.apache.commons.pool.ObjectPool sessionPool) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateObject(Object o) |
PooledSession |
borrowSession() |
void |
close() |
protected ActiveMQSession |
createSession() |
void |
destroyObject(Object o) |
protected ActiveMQConnection |
getConnection() |
protected org.apache.commons.pool.ObjectPool |
getSessionPool() |
void |
invalidateSession(PooledSession session) |
Object |
makeObject() |
void |
passivateObject(Object o) |
void |
returnSession(PooledSession session) |
boolean |
validateObject(Object o) |
public SessionPool(ConnectionPool connectionPool, SessionKey key, org.apache.commons.pool.ObjectPool sessionPool)
public PooledSession borrowSession() throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void returnSession(PooledSession session) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void invalidateSession(PooledSession session) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic Object makeObject() throws Exception
makeObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionpublic void destroyObject(Object o) throws Exception
destroyObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionpublic boolean validateObject(Object o)
validateObject in interface org.apache.commons.pool.PoolableObjectFactorypublic void activateObject(Object o) throws Exception
activateObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionpublic void passivateObject(Object o) throws Exception
passivateObject in interface org.apache.commons.pool.PoolableObjectFactoryExceptionprotected org.apache.commons.pool.ObjectPool getSessionPool() throws AlreadyClosedException
AlreadyClosedExceptionprotected ActiveMQConnection getConnection() throws javax.jms.JMSException
javax.jms.JMSExceptionprotected ActiveMQSession createSession() throws javax.jms.JMSException
javax.jms.JMSExceptionCopyright © 2005–2017. All rights reserved.