org.jboss.jca.core.connectionmanager.pool.strategy

## Class ReauthPool

- java.lang.Object
- - org.jboss.jca.core.connectionmanager.pool.AbstractPool
  - - org.jboss.jca.core.connectionmanager.pool.strategy.ReauthPool

- All Implemented Interfaces:
    org.jboss.jca.core.api.connectionmanager.pool.Pool

      public class ReauthPool
      extends AbstractPool

  Pool implementation that supports reauthentication
  Author:
    Jesper Pedersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReauthPool(javax.resource.spi.ManagedConnectionFactory mcf, org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration pc, boolean noTxSeparatePools, boolean sharable, java.lang.String mcp)` Creates a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `emptyManagedConnectionPool(ManagedConnectionPool pool)` There is no reason to empty the managed connection pool for reauth enabled resource adapters, since all managed connections can change its credentials
    `protected java.lang.Object` | `getKey(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri, boolean separateNoTx)` Retrieve the key for this request.
    `CoreLogger` | `getLogger()` Get the logger
    `boolean` | `testConnection()` Test if a connection can be obtained
    `boolean` | `testConnection(javax.resource.spi.ConnectionRequestInfo cri, javax.security.auth.Subject subject)` Test if a connection can be obtained

    - ### Methods inherited from class org.jboss.jca.core.connectionmanager.pool.AbstractPool

      `cancelShutdown, dumpQueuedThreads, findConnectionListener, findConnectionListener, flush, flush, flush, getCapacity, getConnection, getConnectionManager, getInternalStatistics, getLock, getManagedConnectionFactory, getManagedConnectionPool, getManagedConnectionPools, getName, getPoolConfiguration, getStatistics, getTransactionIntegration, getTransactionManager, getTransactionSynchronizationRegistry, hasConnection, internalTestConnection, isFIFO, isFull, isIdle, isInterleaving, isPrefill, isSharable, isShutdown, prepareShutdown, returnConnection, setCapacity, setConnectionManager, setInterleaving, setName, shutdown`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ReauthPool

          public ReauthPool(javax.resource.spi.ManagedConnectionFactory mcf,
                            org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration pc,
                            boolean noTxSeparatePools,
                            boolean sharable,
                            java.lang.String mcp)

      Creates a new instance.
      Parameters:
        `mcf` - managed connection factory
        `pc` - pool configuration
        `noTxSeparatePools` - notx seperate pool
        `sharable` - Are the connections sharable
        `mcp` - mcp

  - ### Method Detail

    - #### getKey

          protected java.lang.Object getKey(javax.security.auth.Subject subject,
                                            javax.resource.spi.ConnectionRequestInfo cri,
                                            boolean separateNoTx)
                                     throws javax.resource.ResourceException

      Retrieve the key for this request.
      Specified by:
        `getKey` in class `AbstractPool`
      Parameters:
        `subject` - the subject
        `cri` - the connection request information
        `separateNoTx` - separateNoTx
      Returns:
        the key
      Throws:
        `javax.resource.ResourceException` - for any error

    - #### emptyManagedConnectionPool

          public void emptyManagedConnectionPool(ManagedConnectionPool pool)

      There is no reason to empty the managed connection pool for reauth enabled resource adapters, since all managed connections can change its credentials
      Overrides:
        `emptyManagedConnectionPool` in class `AbstractPool`
      Parameters:
        `pool` - the managed connection pool

    - #### testConnection

          public boolean testConnection()

      Test if a connection can be obtained
      Specified by:
        `testConnection` in interface `org.jboss.jca.core.api.connectionmanager.pool.Pool`
      Specified by:
        `testConnection` in class `AbstractPool`
      Returns:
        True if it was possible to get a connection; otherwise false

    - #### testConnection

          public boolean testConnection(javax.resource.spi.ConnectionRequestInfo cri,
                                        javax.security.auth.Subject subject)

      Test if a connection can be obtained
      Specified by:
        `testConnection` in interface `org.jboss.jca.core.api.connectionmanager.pool.Pool`
      Specified by:
        `testConnection` in class `AbstractPool`
      Parameters:
        `cri` - Optional connection request info object
        `subject` - Optional subject
      Returns:
        True if it was possible to get a connection; otherwise false

    - #### getLogger

          public CoreLogger getLogger()

      Get the logger
      Specified by:
        `getLogger` in class `AbstractPool`
      Returns:
        The value

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)