站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 connector API Documentation 英文版文档

ManagedConnectionPool (JBoss Connector API) - JBoss 3.2.7 connector API Documentation 英文版文档


org.jboss.resource.connectionmanager
Interface ManagedConnectionPool

All Known Implementing Classes:
JBossManagedConnectionPool.BasePool

public interface ManagedConnectionPool

A managed connection pool

Version:
$Revision: 1.2.2.7 $
Author:
David Jencks

Method Summary
 void flush()
          flush the pool
 long getAvailableConnectionCount()
           
 ConnectionListener getConnection(Transaction tx, 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

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

Returns:
the managed connection factory

setConnectionListenerFactory

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

Parameters:
clf - the connection event listener factory

getConnection

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

Parameters:
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

public 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

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



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