org.jboss.resource.connectionmanager
Interface ManagedConnectionPool

All Known Implementing Classes:
JBossManagedConnectionPool.BasePool, JBossManagedConnectionPool.OnePool, JBossManagedConnectionPool.PoolByCri, JBossManagedConnectionPool.PoolBySubject, JBossManagedConnectionPool.PoolBySubjectAndCri

public interface ManagedConnectionPool

A managed connection pool

Version:
$Revision: 1.9.6.3 $
Author:
David Jencks

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

Method Detail

getManagedConnectionFactory

javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
Retrieve the managed connection factory for this pool

Returns:
the managed connection factory

setConnectionListenerFactory

void setConnectionListenerFactory(ConnectionListenerFactory clf)
Set the connection listener factory

Parameters:
clf - the connection event listener factory

getConnection

ConnectionListener getConnection(Transaction trackByTransaction,
                                 Subject subject,
                                 javax.resource.spi.ConnectionRequestInfo cri)
                                 throws javax.resource.ResourceException
Get a connection

Parameters:
trackByTransaction - for transaction stickiness
subject - the subject for connection
cri - the connection request information
Returns:
a connection event listener wrapping the connection
Throws:
javax.resource.ResourceException - for any error

returnConnection

void returnConnection(ConnectionListener cl,
                      boolean kill)
                      throws javax.resource.ResourceException
Return a connection

Parameters:
cl - the connection event listener wrapping the connection
kill - whether to destroy the managed connection
Throws:
javax.resource.ResourceException - for any error

getConnectionCount

int getConnectionCount()
Returns:
the connection count

getInUseConnectionCount

int getInUseConnectionCount()
Returns:
the connections in use count

getConnectionCreatedCount

int getConnectionCreatedCount()
Returns:
the connections created count

getConnectionDestroyedCount

int getConnectionDestroyedCount()
Returns:
the connections destroyed count

shutdown

void shutdown()
shutdown the pool


getAvailableConnectionCount

long getAvailableConnectionCount()
Returns:
the available connections

getMaxConnectionsInUseCount

int getMaxConnectionsInUseCount()
Returns:
the available connections

flush

void flush()
flush the pool



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.