|
||||||||||
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 logMethod 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 ManagedConnectionPool
public void setConnectionListenerFactory(ConnectionListenerFactory clf)
ManagedConnectionPool
setConnectionListenerFactory
in interface ManagedConnectionPool
clf
- the connection event listener factorypublic ConnectionListener getConnection(Transaction trackByTransaction, Subject subject, javax.resource.spi.ConnectionRequestInfo cri) throws javax.resource.ResourceException
ManagedConnectionPool
getConnection
in interface ManagedConnectionPool
trackByTransaction
- for transaction stickinesssubject
- the subject for connectioncri
- the connection request information
javax.resource.ResourceException
- for any errorpublic boolean shouldPreFill()
PreFillPoolSupport
shouldPreFill
in interface PreFillPoolSupport
public void prefill()
PreFillPoolSupport
prefill
in interface PreFillPoolSupport
public void prefill(boolean noTxSeperatePool)
PreFillPoolSupport
prefill
in interface PreFillPoolSupport
noTxSeperatePool
- whether or not we are seperating non transaction and transaction poolspublic void prefill(Subject subject, javax.resource.spi.ConnectionRequestInfo cri, boolean noTxSeperatePool)
PreFillPoolSupport
prefill
in interface PreFillPoolSupport
subject
- the subject the subjectcri
- the connection request infonoTxSeperatePool
- whether or not we are seperating non transaction and transaction poolspublic void returnConnection(ConnectionListener cl, boolean kill) throws javax.resource.ResourceException
ManagedConnectionPool
returnConnection
in interface ManagedConnectionPool
cl
- the connection event listener wrapping the connectionkill
- whether to destroy the managed connection
javax.resource.ResourceException
- for any errorpublic int getInUseConnectionCount()
getInUseConnectionCount
in interface ManagedConnectionPool
public int getConnectionCount()
getConnectionCount
in interface ManagedConnectionPool
public String getPoolName()
public boolean getPreFill()
public int getConnectionCreatedCount()
getConnectionCreatedCount
in interface ManagedConnectionPool
public int getConnectionDestroyedCount()
getConnectionDestroyedCount
in interface ManagedConnectionPool
public long getAvailableConnectionCount()
getAvailableConnectionCount
in interface ManagedConnectionPool
public int getMaxConnectionsInUseCount()
getMaxConnectionsInUseCount
in interface ManagedConnectionPool
public void shutdown()
ManagedConnectionPool
shutdown
in interface ManagedConnectionPool
public void flush()
ManagedConnectionPool
flush
in interface ManagedConnectionPool
protected 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 |