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.JMSException
public void returnSession(PooledSession session) throws javax.jms.JMSException
javax.jms.JMSException
public void invalidateSession(PooledSession session) throws javax.jms.JMSException
javax.jms.JMSException
public Object makeObject() throws Exception
makeObject
in interface org.apache.commons.pool.PoolableObjectFactory
Exception
public void destroyObject(Object o) throws Exception
destroyObject
in interface org.apache.commons.pool.PoolableObjectFactory
Exception
public boolean validateObject(Object o)
validateObject
in interface org.apache.commons.pool.PoolableObjectFactory
public void activateObject(Object o) throws Exception
activateObject
in interface org.apache.commons.pool.PoolableObjectFactory
Exception
public void passivateObject(Object o) throws Exception
passivateObject
in interface org.apache.commons.pool.PoolableObjectFactory
Exception
protected org.apache.commons.pool.ObjectPool getSessionPool() throws AlreadyClosedException
AlreadyClosedException
protected ActiveMQConnection getConnection() throws javax.jms.JMSException
javax.jms.JMSException
protected ActiveMQSession createSession() throws javax.jms.JMSException
javax.jms.JMSException
Copyright © 2005–2015. All rights reserved.