org.jboss.resource.connectionmanager
Class InternalManagedConnectionPool

java.lang.Object
  extended by org.jboss.resource.connectionmanager.InternalManagedConnectionPool

public class InternalManagedConnectionPool
extends Object

The internal pool implementation

Version:
$Revision: 1.30.2.5 $
Author:
David Jencks, Adrian Brock

Nested Class Summary
static class InternalManagedConnectionPool.PoolParams
           
 
Constructor Summary
protected InternalManagedConnectionPool(javax.resource.spi.ManagedConnectionFactory mcf, ConnectionListenerFactory clf, Subject subject, javax.resource.spi.ConnectionRequestInfo cri, InternalManagedConnectionPool.PoolParams poolParams, org.jboss.logging.Logger log)
          Create a new internal pool
 
Method Summary
 void fillToMin()
           
 void flush()
           
 long getAvailableConnections()
           
 ConnectionListener getConnection(Subject subject, javax.resource.spi.ConnectionRequestInfo cri)
          todo distinguish between connection dying while match called and bad match strategy.
 int getConnectionCount()
           
 int getConnectionCreatedCount()
           
 int getConnectionDestroyedCount()
           
 int getConnectionInUseCount()
           
 int getMaxConnectionsInUseCount()
           
protected  void initialize()
          Initialize the pool
 void removeTimedOut()
           
 void returnConnection(ConnectionListener cl, boolean kill)
           
 void shutdown()
           
 void shutdownWithoutClear()
          For testing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalManagedConnectionPool

protected InternalManagedConnectionPool(javax.resource.spi.ManagedConnectionFactory mcf,
                                        ConnectionListenerFactory clf,
                                        Subject subject,
                                        javax.resource.spi.ConnectionRequestInfo cri,
                                        InternalManagedConnectionPool.PoolParams poolParams,
                                        org.jboss.logging.Logger log)
Create a new internal pool

Parameters:
mcf - the managed connection factory
subject - the subject
cri - the connection request information
poolParams - the pooling parameters
log - the log
Method Detail

initialize

protected void initialize()
Initialize the pool


getAvailableConnections

public long getAvailableConnections()

getMaxConnectionsInUseCount

public int getMaxConnectionsInUseCount()

getConnectionInUseCount

public int getConnectionInUseCount()

getConnection

public ConnectionListener getConnection(Subject subject,
                                        javax.resource.spi.ConnectionRequestInfo cri)
                                 throws javax.resource.ResourceException
todo distinguish between connection dying while match called and bad match strategy. In latter case we should put it back in the pool.

Throws:
javax.resource.ResourceException

returnConnection

public void returnConnection(ConnectionListener cl,
                             boolean kill)

flush

public void flush()

removeTimedOut

public void removeTimedOut()

shutdownWithoutClear

public void shutdownWithoutClear()
For testing


shutdown

public void shutdown()

fillToMin

public void fillToMin()

getConnectionCount

public int getConnectionCount()

getConnectionCreatedCount

public int getConnectionCreatedCount()

getConnectionDestroyedCount

public int getConnectionDestroyedCount()


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