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

java.lang.Object
  extended by org.jboss.jca.core.connectionmanager.pool.AbstractPool
      extended by 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 Initial implementation is based on OnePool with no prefill support, since each managed connection will likely have different credentials. Note, that using a simple key (ReauthKey) will result in a higher reauthentication numbers than optimal.

Author:
Jesper Pedersen

Constructor Summary
ReauthPool(javax.resource.spi.ManagedConnectionFactory mcf, org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration pc, boolean noTxSeparatePools)
          Creates a new instance.
 
Method Summary
 void emptyManagedConnectionPool(ManagedConnectionPool pool)
          There is no reason to empty the subpool for reauth enabled resource adapters, since all managed connections can change its credentials
protected  Object getKey(Subject subject, javax.resource.spi.ConnectionRequestInfo cri, boolean separateNoTx)
          Retrieve the key for this request.
 CoreLogger getLogger()
          Get the logger
 boolean testConnection()
          
 
Methods inherited from class org.jboss.jca.core.connectionmanager.pool.AbstractPool
flush, flush, getConnection, getConnectionListenerFactory, getManagedConnectionFactory, getManagedConnectionPool, getName, getStatistics, getTransactionIntegration, getTransactionManager, getTransactionSynchronizationRegistry, internalTestConnection, returnConnection, setConnectionListenerFactory, 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)
Creates a new instance.

Parameters:
mcf - managed connection factory
pc - pool configuration
noTxSeparatePools - notx seperate pool
Method Detail

getKey

protected Object getKey(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 subpool for reauth enabled resource adapters, since all managed connections can change its credentials

Overrides:
emptyManagedConnectionPool in class AbstractPool
Parameters:
pool - the internal managed connection pool

testConnection

public boolean testConnection()

Specified by:
testConnection in interface org.jboss.jca.core.api.connectionmanager.pool.Pool
Specified by:
testConnection in class AbstractPool

getLogger

public CoreLogger getLogger()
Get the logger

Specified by:
getLogger in class AbstractPool
Returns:
The value


Copyright © 2012 JBoss, by Red Hat (http://www.jboss.org/ironjacamar)