org.apache.activemq.pool
Class SessionPool
java.lang.Object
org.apache.activemq.pool.SessionPool
- All Implemented Interfaces:
- PoolableObjectFactory
public class SessionPool
- extends Object
- implements PoolableObjectFactory
Represents the session pool for a given JMS connection.
- Version:
- $Revision: 1.1 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SessionPool
public SessionPool(ConnectionPool connectionPool,
SessionKey key,
ObjectPool sessionPool)
close
public void close()
throws Exception
- Throws:
Exception
borrowSession
public PooledSession borrowSession()
throws JMSException
- Throws:
JMSException
returnSession
public void returnSession(PooledSession session)
throws JMSException
- Throws:
JMSException
invalidateSession
public void invalidateSession(PooledSession session)
throws JMSException
- Throws:
JMSException
makeObject
public Object makeObject()
throws Exception
- Specified by:
makeObject
in interface PoolableObjectFactory
- Throws:
Exception
destroyObject
public void destroyObject(Object o)
throws Exception
- Specified by:
destroyObject
in interface PoolableObjectFactory
- Throws:
Exception
validateObject
public boolean validateObject(Object o)
- Specified by:
validateObject
in interface PoolableObjectFactory
activateObject
public void activateObject(Object o)
throws Exception
- Specified by:
activateObject
in interface PoolableObjectFactory
- Throws:
Exception
passivateObject
public void passivateObject(Object o)
throws Exception
- Specified by:
passivateObject
in interface PoolableObjectFactory
- Throws:
Exception
getSessionPool
protected ObjectPool getSessionPool()
throws AlreadyClosedException
- Throws:
AlreadyClosedException
getConnection
protected ActiveMQConnection getConnection()
throws JMSException
- Throws:
JMSException
createSession
protected ActiveMQSession createSession()
throws JMSException
- Throws:
JMSException
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.