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

java.lang.Object
  extended by org.jboss.jca.core.connectionmanager.pool.AbstractPool
      extended by org.jboss.jca.core.connectionmanager.pool.strategy.PoolBySubjectAndCri
All Implemented Interfaces:
org.jboss.jca.core.api.connectionmanager.pool.Pool

public class PoolBySubjectAndCri
extends AbstractPool

Pool implementation that uses subject and connection request info for its pool partition.

Author:
Gurkan Erdogdu, Jesper Pedersen

Constructor Summary
PoolBySubjectAndCri(javax.resource.spi.ManagedConnectionFactory mcf, org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration pc, boolean noTxSeparatePools)
          Creates a new instance.
 
Method Summary
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
emptyManagedConnectionPool, 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

PoolBySubjectAndCri

public PoolBySubjectAndCri(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

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 © 2008 Red Hat Middleware LLC (http://www.jboss.com/)