|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.resource.connectionmanager.JBossManagedConnectionPool.BasePool
public abstract static class JBossManagedConnectionPool.BasePool
The base pool implementation
| Field Summary | |
|---|---|
protected boolean |
noTxSeparatePools
Whether to use separate pools for transactional and non-transaction use |
protected InternalManagedConnectionPool.PoolParams |
poolParams
The pool parameters |
| Constructor Summary | |
|---|---|
JBossManagedConnectionPool.BasePool(javax.resource.spi.ManagedConnectionFactory mcf,
InternalManagedConnectionPool.PoolParams poolParams,
boolean noTxSeparatePools,
org.jboss.logging.Logger log)
|
|
JBossManagedConnectionPool.BasePool(javax.resource.spi.ManagedConnectionFactory mcf,
String poolName,
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 trackByTransaction,
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()
|
String |
getPoolName()
|
boolean |
getPreFill()
|
protected JBossManagedConnectionPool.SubPoolContext |
getSubPool(Object key)
|
protected JBossManagedConnectionPool.SubPoolContext |
getSubPool(Object key,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
Determine the correct pool for this request, creates a new one when necessary |
protected TransactionManager |
getTransactionManager()
Get any transaction manager associated with the pool |
void |
prefill()
Prefill the connection pool |
void |
prefill(boolean noTxSeperatePool)
Prefill the connection pool |
void |
prefill(Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
boolean noTxSeperatePool)
Prefill the connection pool |
void |
returnConnection(ConnectionListener cl,
boolean kill)
Return a connection |
void |
setConnectionListenerFactory(ConnectionListenerFactory clf)
Set the connection listener factory |
boolean |
shouldPreFill()
Get the flag indicating whether or not to attempt to prefill this pool. |
void |
shutdown()
shutdown the pool |
protected void |
shutdownWithoutClear()
For testing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final InternalManagedConnectionPool.PoolParams poolParams
protected boolean noTxSeparatePools
| Constructor Detail |
|---|
public JBossManagedConnectionPool.BasePool(javax.resource.spi.ManagedConnectionFactory mcf,
InternalManagedConnectionPool.PoolParams poolParams,
boolean noTxSeparatePools,
org.jboss.logging.Logger log)
public JBossManagedConnectionPool.BasePool(javax.resource.spi.ManagedConnectionFactory mcf,
String poolName,
InternalManagedConnectionPool.PoolParams poolParams,
boolean noTxSeparatePools,
org.jboss.logging.Logger log)
mcf - the managed connection factorypoolParams - the pooling parameterslog - the log| Method Detail |
|---|
protected abstract Object getKey(Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
boolean separateNoTx)
throws javax.resource.ResourceException
subject - the subjectcri - the connection request information
javax.resource.ResourceException - for any errorpublic javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
ManagedConnectionPool
getManagedConnectionFactory in interface ManagedConnectionPoolpublic void setConnectionListenerFactory(ConnectionListenerFactory clf)
ManagedConnectionPool
setConnectionListenerFactory in interface ManagedConnectionPoolclf - the connection event listener factory
public ConnectionListener getConnection(Transaction trackByTransaction,
Subject subject,
javax.resource.spi.ConnectionRequestInfo cri)
throws javax.resource.ResourceException
ManagedConnectionPool
getConnection in interface ManagedConnectionPooltrackByTransaction - for transaction stickinesssubject - the subject for connectioncri - the connection request information
javax.resource.ResourceException - for any errorpublic boolean shouldPreFill()
PreFillPoolSupport
shouldPreFill in interface PreFillPoolSupportpublic void prefill()
PreFillPoolSupport
prefill in interface PreFillPoolSupportpublic void prefill(boolean noTxSeperatePool)
PreFillPoolSupport
prefill in interface PreFillPoolSupportnoTxSeperatePool - whether or not we are seperating non transaction and transaction pools
public void prefill(Subject subject,
javax.resource.spi.ConnectionRequestInfo cri,
boolean noTxSeperatePool)
PreFillPoolSupport
prefill in interface PreFillPoolSupportsubject - the subject the subjectcri - the connection request infonoTxSeperatePool - whether or not we are seperating non transaction and transaction pools
public void returnConnection(ConnectionListener cl,
boolean kill)
throws javax.resource.ResourceException
ManagedConnectionPool
returnConnection in interface ManagedConnectionPoolcl - the connection event listener wrapping the connectionkill - whether to destroy the managed connection
javax.resource.ResourceException - for any errorpublic int getInUseConnectionCount()
getInUseConnectionCount in interface ManagedConnectionPoolpublic int getConnectionCount()
getConnectionCount in interface ManagedConnectionPoolpublic String getPoolName()
public boolean getPreFill()
public int getConnectionCreatedCount()
getConnectionCreatedCount in interface ManagedConnectionPoolpublic int getConnectionDestroyedCount()
getConnectionDestroyedCount in interface ManagedConnectionPoolpublic long getAvailableConnectionCount()
getAvailableConnectionCount in interface ManagedConnectionPoolpublic int getMaxConnectionsInUseCount()
getMaxConnectionsInUseCount in interface ManagedConnectionPoolpublic void shutdown()
ManagedConnectionPool
shutdown in interface ManagedConnectionPoolpublic void flush()
ManagedConnectionPool
flush in interface ManagedConnectionPoolprotected void shutdownWithoutClear()
protected TransactionManager getTransactionManager()
protected JBossManagedConnectionPool.SubPoolContext getSubPool(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 JBossManagedConnectionPool.SubPoolContext getSubPool(Object key)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||