|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.jca.core.connectionmanager.pool.AbstractPool
public abstract class AbstractPool

Abstract pool implementation.
It can contains sub-pools according to the semantic of
the pool. Concrete implementatins override getKey(Subject, ConnectionRequestInfo, boolean)
method to create map key object.
| Field Summary | |
|---|---|
protected CoreLogger |
log
The logger |
| Constructor Summary | |
|---|---|
protected |
AbstractPool(javax.resource.spi.ManagedConnectionFactory mcf,
org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration pc,
boolean noTxSeparatePools)
Create a new base pool. |
| Method Summary | |
|---|---|
void |
emptyManagedConnectionPool(ManagedConnectionPool pool)
Remove the matching managed connection pool if the pool is empty |
void |
flush()
|
void |
flush(boolean kill)
|
ConnectionListener |
getConnection(Transaction trackByTransaction,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Get a connection |
protected ConnectionListenerFactory |
getConnectionListenerFactory()
Get the connection listener factory |
protected abstract Object |
getKey(Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
boolean separateNoTx)
Retrieve the key for this request. |
abstract CoreLogger |
getLogger()
Get the logger |
javax.resource.spi.ManagedConnectionFactory |
getManagedConnectionFactory()
Retrieve the managed connection factory for this pool. |
protected ManagedConnectionPool |
getManagedConnectionPool(Object key,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Determine the correct pool for this request, creates a new one when necessary. |
String |
getName()
Gets pool name. |
org.jboss.jca.core.api.connectionmanager.pool.PoolStatistics |
getStatistics()
|
protected org.jboss.jca.core.spi.transaction.TransactionIntegration |
getTransactionIntegration()
Get any transaction integration associated with the pool. |
protected TransactionManager |
getTransactionManager()
Get any transaction manager associated with the pool. |
protected TransactionSynchronizationRegistry |
getTransactionSynchronizationRegistry()
Get any transaction synchronization registry associated with the pool. |
protected boolean |
internalTestConnection(Subject subject)
Test if a connection can be obtained |
void |
returnConnection(ConnectionListener cl,
boolean kill)
Return a connection |
void |
setConnectionListenerFactory(ConnectionListenerFactory clf)
Set the connection listener factory. |
void |
setName(String poolName)
Sets pool name. |
void |
shutdown()
Shutdown the pool |
abstract boolean |
testConnection()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final CoreLogger log
| Constructor Detail |
|---|
protected AbstractPool(javax.resource.spi.ManagedConnectionFactory mcf,
org.jboss.jca.core.api.connectionmanager.pool.PoolConfiguration pc,
boolean noTxSeparatePools)
mcf - the managed connection factorypc - the pool configurationnoTxSeparatePools - noTxSeparatePool| Method Detail |
|---|
public void setName(String poolName)
poolName - pool namepublic String getName()
getName in interface org.jboss.jca.core.api.connectionmanager.pool.Pool
protected abstract Object getKey(Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
boolean separateNoTx)
throws javax.resource.ResourceException
subject - the subjectcri - the connection request informationseparateNoTx - separateNoTx
javax.resource.ResourceException - for any error
protected ManagedConnectionPool getManagedConnectionPool(Object key,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
throws javax.resource.ResourceException
key - the key to the poolsubject - the subject of the poolcri - the connection request info
javax.resource.ResourceException - for any errorprotected org.jboss.jca.core.spi.transaction.TransactionIntegration getTransactionIntegration()
protected TransactionManager getTransactionManager()
protected TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
public void emptyManagedConnectionPool(ManagedConnectionPool pool)
pool - The poolpublic void flush()
flush in interface org.jboss.jca.core.api.connectionmanager.pool.Poolpublic void flush(boolean kill)
flush in interface org.jboss.jca.core.api.connectionmanager.pool.Pool
public ConnectionListener getConnection(Transaction trackByTransaction,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
throws javax.resource.ResourceException
trackByTransaction - for transaction stickinesssubject - the subject for connectioncri - the connection request information
javax.resource.ResourceException - for any errorpublic javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
public void returnConnection(ConnectionListener cl,
boolean kill)
throws javax.resource.ResourceException
cl - the connection event listener wrapping the connectionkill - whether to destroy the managed connection
javax.resource.ResourceException - for any errorprotected ConnectionListenerFactory getConnectionListenerFactory()
public void setConnectionListenerFactory(ConnectionListenerFactory clf)
clf - the connection event listener factorypublic void shutdown()
public org.jboss.jca.core.api.connectionmanager.pool.PoolStatistics getStatistics()
getStatistics in interface org.jboss.jca.core.api.connectionmanager.pool.Poolpublic abstract boolean testConnection()
testConnection in interface org.jboss.jca.core.api.connectionmanager.pool.Poolprotected boolean internalTestConnection(Subject subject)
subject - Optional subject
public abstract CoreLogger getLogger()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||