org.apache.activemq.pool
Class ConnectionPool

java.lang.Object
  extended by org.apache.activemq.pool.ConnectionPool
Direct Known Subclasses:
XaConnectionPool

public class ConnectionPool
extends Object

Holds a real JMS connection along with the session pools associated with it.

Version:
$Revision: 668559 $

Constructor Summary
ConnectionPool(ActiveMQConnection connection, Map<SessionKey,SessionPool> cache, ObjectPoolFactory poolFactory)
           
ConnectionPool(ActiveMQConnection connection, ObjectPoolFactory poolFactory)
           
 
Method Summary
 void close()
           
 Session createSession(boolean transacted, int ackMode)
           
protected  SessionPool createSessionPool(SessionKey key)
           
 void decrementReferenceCount()
           
 boolean expiredCheck()
           
 ActiveMQConnection getConnection()
           
 int getIdleTimeout()
           
 void incrementReferenceCount()
           
 void setIdleTimeout(int idleTimeout)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionPool

public ConnectionPool(ActiveMQConnection connection,
                      ObjectPoolFactory poolFactory)

ConnectionPool

public ConnectionPool(ActiveMQConnection connection,
                      Map<SessionKey,SessionPool> cache,
                      ObjectPoolFactory poolFactory)
Method Detail

start

public void start()
           throws JMSException
Throws:
JMSException

getConnection

public ActiveMQConnection getConnection()

createSession

public Session createSession(boolean transacted,
                             int ackMode)
                      throws JMSException
Throws:
JMSException

close

public void close()

incrementReferenceCount

public void incrementReferenceCount()

decrementReferenceCount

public void decrementReferenceCount()

expiredCheck

public boolean expiredCheck()
Returns:
true if this connection has expired.

getIdleTimeout

public int getIdleTimeout()

setIdleTimeout

public void setIdleTimeout(int idleTimeout)

createSessionPool

protected SessionPool createSessionPool(SessionKey key)


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.