org.activemq.pool
Class SessionPool
java.lang.Object
org.activemq.pool.SessionPool
- All Implemented Interfaces:
- org.apache.commons.pool.PoolableObjectFactory
public class SessionPool
- extends Object
- implements org.apache.commons.pool.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(ActiveMQConnection connection,
SessionKey key)
SessionPool
public SessionPool(ActiveMQConnection connection,
SessionKey key,
org.apache.commons.pool.ObjectPool sessionPool)
borrowSession
public PooledSession borrowSession()
throws JMSException
- Throws:
JMSException
makeObject
public Object makeObject()
throws Exception
- Specified by:
makeObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
destroyObject
public void destroyObject(Object o)
throws Exception
- Specified by:
destroyObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
validateObject
public boolean validateObject(Object o)
- Specified by:
validateObject
in interface org.apache.commons.pool.PoolableObjectFactory
activateObject
public void activateObject(Object o)
throws Exception
- Specified by:
activateObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
passivateObject
public void passivateObject(Object o)
throws Exception
- Specified by:
passivateObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
Exception
getConnection
protected ActiveMQConnection getConnection()
throws JMSException
- Throws:
JMSException
createSession
protected ActiveMQSession createSession()
throws JMSException
- Throws:
JMSException
Copyright © 2004-2009 Protique, Ltd.. All Rights Reserved.