Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.resource.connectionmanager
Class JBossManagedConnectionPool.BasePool

    java.lang.Object
      org.jboss.resource.connectionmanager.JBossManagedConnectionPool.BasePool

All Implemented Interfaces:
  ManagedConnectionPool

Direct Known Subclasses:
  JBossManagedConnectionPool.OnePool, JBossManagedConnectionPool.PoolByCri, JBossManagedConnectionPool.PoolBySubject, JBossManagedConnectionPool.PoolBySubjectAndCri

Enclosing class:
  JBossManagedConnectionPool

public abstract static class JBossManagedConnectionPool.BasePool
extends Object
implements ManagedConnectionPool

The base pool implementation

Constructor Summary
`JBossManagedConnectionPool.BasePool(javax.resource.spi.ManagedConnectionFactory mcf, InternalManagedConnectionPool.PoolParams poolParams, boolean noTxSeparatePools, org.jboss.logging.Logger log)` Create a new base pool

Method Summary
`void` | `flush()` flush the pool
`long` | `getAvailableConnectionCount()`
`ConnectionListener` | `getConnection(Transaction transaction, Subject subject, javax.resource.spi.ConnectionRequestInfo cri)` Get a connection
`int` | `getConnectionCount()`
`int` | `getConnectionCreatedCount()`
`int` | `getConnectionDestroyedCount()`
`int` | `getInUseConnectionCount()` Return the inuse count
`protected abstract Object` | `getKey(Subject subject, javax.resource.spi.ConnectionRequestInfo cri, boolean separateNoTx)` Retrieve the key for this request
`javax.resource.spi.ManagedConnectionFactory` | `getManagedConnectionFactory()` Retrieve the managed connection factory for this pool
`int` | `getMaxConnectionsInUseCount()`
`protected TransactionManager` | `getTransactionManager()` Get any transaction manager associated with the pool
`void` | `returnConnection(ConnectionListener cl, boolean kill)` Return a connection
`void` | `setConnectionListenerFactory(ConnectionListenerFactory clf)` Set the connection listener factory
`void` | `shutdown()` shutdown the pool

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JBossManagedConnectionPool.BasePool

    public JBossManagedConnectionPool.BasePool(javax.resource.spi.ManagedConnectionFactory mcf,
                                               InternalManagedConnectionPool.PoolParams poolParams,
                                               boolean noTxSeparatePools,
                                               org.jboss.logging.Logger log)

  Create a new base pool

Parameters:
  `mcf` - the managed connection factory
  `poolParams` - the pooling parameters
  `log` - the log

Method Detail

### getKey

    protected abstract Object getKey(Subject subject,
                                     javax.resource.spi.ConnectionRequestInfo cri,
                                     boolean separateNoTx)
                              throws javax.resource.ResourceException

  Retrieve the key for this request

  Parameters:
    `subject` - the subject
    `cri` - the connection request information
  Returns:
    the key
  Throws:
    `javax.resource.ResourceException` - for any error

### getManagedConnectionFactory

    public javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()

  Description copied from interface: `ManagedConnectionPool`
  Retrieve the managed connection factory for this pool

  Specified by:
    `getManagedConnectionFactory` in interface `ManagedConnectionPool`
  Returns:
    the managed connection factory

### setConnectionListenerFactory

    public void setConnectionListenerFactory(ConnectionListenerFactory clf)

  Description copied from interface: `ManagedConnectionPool`
  Set the connection listener factory

  Specified by:
    `setConnectionListenerFactory` in interface `ManagedConnectionPool`
  Parameters:
    `clf` - the connection event listener factory

### getInUseConnectionCount

    public int getInUseConnectionCount()

  Return the inuse count

  Specified by:
    `getInUseConnectionCount` in interface `ManagedConnectionPool`
  Returns:
    the count

### getConnection

    public ConnectionListener getConnection(Transaction transaction,
                                            Subject subject,
                                            javax.resource.spi.ConnectionRequestInfo cri)
                                     throws javax.resource.ResourceException

  Description copied from interface: `ManagedConnectionPool`
  Get a connection

  Specified by:
    `getConnection` in interface `ManagedConnectionPool`
  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

  Description copied from interface: `ManagedConnectionPool`
  Return a connection

  Specified by:
    `returnConnection` in interface `ManagedConnectionPool`
  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()

  Specified by:
    `getConnectionCount` in interface `ManagedConnectionPool`
  Returns:
    the connection count

### getConnectionCreatedCount

    public int getConnectionCreatedCount()

  Specified by:
    `getConnectionCreatedCount` in interface `ManagedConnectionPool`
  Returns:
    the connections created count

### getConnectionDestroyedCount

    public int getConnectionDestroyedCount()

  Specified by:
    `getConnectionDestroyedCount` in interface `ManagedConnectionPool`
  Returns:
    the connections destroyed count

### getAvailableConnectionCount

    public long getAvailableConnectionCount()

  Specified by:
    `getAvailableConnectionCount` in interface `ManagedConnectionPool`
  Returns:
    the available connections

### getMaxConnectionsInUseCount

    public int getMaxConnectionsInUseCount()

  Specified by:
    `getMaxConnectionsInUseCount` in interface `ManagedConnectionPool`
  Returns:
    the available connections

### shutdown

    public void shutdown()

  Description copied from interface: `ManagedConnectionPool`
  shutdown the pool

  Specified by:
    `shutdown` in interface `ManagedConnectionPool`

### flush

    public void flush()

  Description copied from interface: `ManagedConnectionPool`
  flush the pool

  Specified by:
    `flush` in interface `ManagedConnectionPool`

### getTransactionManager

    protected TransactionManager getTransactionManager()

  Get any transaction manager associated with the pool

  Returns:
    the transaction manager

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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