org.jboss.resource.connectionmanager
Interface ManagedConnectionPool

All Known Implementing Classes:
JBossManagedConnectionPool.BasePool (src)

public interface ManagedConnectionPool

A managed connection pool


Method Summary
 void flush()
          flush the pool
 long getAvailableConnectionCount()
           
 ConnectionListener (src) getConnection(Transaction (src)  tx, javax.security.auth.Subject subject, ConnectionRequestInfo (src)  cri)
          Get a connection
 int getConnectionCount()
           
 int getConnectionCreatedCount()
           
 int getConnectionDestroyedCount()
           
 int getInUseConnectionCount()
           
 ManagedConnectionFactory (src) getManagedConnectionFactory()
          Retrieve the managed connection factory for this pool
 int getMaxConnectionsInUseCount()
           
 void returnConnection(ConnectionListener (src)  cl, boolean kill)
          Return a connection
 void setConnectionListenerFactory(ConnectionListenerFactory (src)  clf)
          Set the connection listener factory
 void shutdown()
          shutdown the pool
 

Method Detail

getManagedConnectionFactory

public ManagedConnectionFactory (src)  getManagedConnectionFactory()
Retrieve the managed connection factory for this pool

Returns:
the managed connection factory

setConnectionListenerFactory

public void setConnectionListenerFactory(ConnectionListenerFactory (src)  clf)
Set the connection listener factory

Parameters:
clf - the connection event listener factory

getConnection

public ConnectionListener (src)  getConnection(Transaction (src)  tx,
                                        javax.security.auth.Subject subject,
                                        ConnectionRequestInfo (src)  cri)
                                 throws ResourceException (src) 
Get a connection

Parameters:
subject - the subject for connection
cri - the connection request information
Returns:
a connection event listener wrapping the connection
Throws:
ResourceException (src) - for any error

returnConnection

public void returnConnection(ConnectionListener (src)  cl,
                             boolean kill)
                      throws ResourceException (src) 
Return a connection

Parameters:
cl - the connection event listener wrapping the connection
kill - whether to destroy the managed connection
Throws:
ResourceException (src) - for any error

getConnectionCount

public int getConnectionCount()
Returns:
the connection count

getInUseConnectionCount

public int getInUseConnectionCount()
Returns:
the connections in use count

getConnectionCreatedCount

public int getConnectionCreatedCount()
Returns:
the connections created count

getConnectionDestroyedCount

public int getConnectionDestroyedCount()
Returns:
the connections destroyed count

shutdown

public void shutdown()
shutdown the pool


getAvailableConnectionCount

public long getAvailableConnectionCount()
Returns:
the available connections

getMaxConnectionsInUseCount

public int getMaxConnectionsInUseCount()
Returns:
the available connections

flush

public void flush()
flush the pool