org.apache.activemq.pool
Class SessionPool
java.lang.Object
org.apache.activemq.pool.SessionPool
- All Implemented Interfaces:
- org.apache.commons.pool.PoolableObjectFactory
public class SessionPool
- extends java.lang.Object
- implements org.apache.commons.pool.PoolableObjectFactory
Represents the session pool for a given JMS connection.
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,
org.apache.commons.pool.ObjectPool sessionPool)
close
public void close()
throws java.lang.Exception
- Throws:
java.lang.Exception
borrowSession
public PooledSession borrowSession()
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
returnSession
public void returnSession(PooledSession session)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
invalidateSession
public void invalidateSession(PooledSession session)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
makeObject
public java.lang.Object makeObject()
throws java.lang.Exception
- Specified by:
makeObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
java.lang.Exception
destroyObject
public void destroyObject(java.lang.Object o)
throws java.lang.Exception
- Specified by:
destroyObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
java.lang.Exception
validateObject
public boolean validateObject(java.lang.Object o)
- Specified by:
validateObject
in interface org.apache.commons.pool.PoolableObjectFactory
activateObject
public void activateObject(java.lang.Object o)
throws java.lang.Exception
- Specified by:
activateObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
java.lang.Exception
passivateObject
public void passivateObject(java.lang.Object o)
throws java.lang.Exception
- Specified by:
passivateObject
in interface org.apache.commons.pool.PoolableObjectFactory
- Throws:
java.lang.Exception
getSessionPool
protected org.apache.commons.pool.ObjectPool getSessionPool()
throws AlreadyClosedException
- Throws:
AlreadyClosedException
getConnection
protected ActiveMQConnection getConnection()
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
createSession
protected ActiveMQSession createSession()
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
Copyright © 2005-2012. All Rights Reserved.