public class CachedConnectionManagerImpl extends java.lang.Object implements CachedConnectionManager
| Constructor and Description |
|---|
CachedConnectionManagerImpl(javax.transaction.TransactionManager transactionManager,
javax.transaction.TransactionSynchronizationRegistry transactionSynchronizationRegistry,
UserTransactionRegistry userTransactionRegistry)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfConnections()
Get the number of connections currently in use - if debug is enabled
|
javax.transaction.TransactionManager |
getTransactionManager()
Gets transaction manager.
|
javax.transaction.TransactionSynchronizationRegistry |
getTransactionSynchronizationRegistry()
Gets transaction synchronization registry
|
boolean |
isDebug()
Is debug enabled
|
boolean |
isError()
Is error enabled
|
boolean |
isIgnoreUnknownConnections()
Is ignore unknown connections on close enabled
|
java.util.Map<java.lang.String,java.lang.String> |
listConnections()
List the connections in use - if debug is enabled
The return value is the connection key, and its allocation stack trace
|
void |
popMetaAwareObject(java.util.Set unsharableResources)
Pop a component context
|
void |
pushMetaAwareObject(java.lang.Object rawKey,
java.util.Set unsharableResources)
Push a component context
|
void |
registerConnection(ConnectionCacheListener cm,
ConnectionListener cl,
java.lang.Object connection,
javax.resource.spi.ConnectionRequestInfo cri)
Register connection.
|
void |
setDebug(boolean v)
Set debug flag
|
void |
setError(boolean v)
Set error flag
|
void |
setIgnoreUnknownConnections(boolean v)
Set ignore unknown connections flag
|
void |
start()
Start
|
void |
stop()
Stop
|
java.lang.String |
toString()
String representation
|
void |
unregisterConnection(ConnectionCacheListener cm,
java.lang.Object connection)
Unregister connection.
|
void |
unregisterConnectionCacheListener(ConnectionCacheListener cm)
Describe
unregisterConnectionCacheListener method here. |
void |
userTransactionStarted()
An user transaction has started
|
public CachedConnectionManagerImpl(javax.transaction.TransactionManager transactionManager,
javax.transaction.TransactionSynchronizationRegistry transactionSynchronizationRegistry,
UserTransactionRegistry userTransactionRegistry)
transactionManager - The transaction managertransactionSynchronizationRegistry - the transaction synchronization registryuserTransactionRegistry - The user transaction registrypublic javax.transaction.TransactionManager getTransactionManager()
getTransactionManager in interface CachedConnectionManagerpublic javax.transaction.TransactionSynchronizationRegistry getTransactionSynchronizationRegistry()
public boolean isDebug()
isDebug in interface CachedConnectionManagerpublic void setDebug(boolean v)
setDebug in interface CachedConnectionManagerv - The valuepublic boolean isError()
isError in interface CachedConnectionManagerpublic void setError(boolean v)
setError in interface CachedConnectionManagerv - The valuepublic boolean isIgnoreUnknownConnections()
isIgnoreUnknownConnections in interface CachedConnectionManagerpublic void setIgnoreUnknownConnections(boolean v)
setIgnoreUnknownConnections in interface CachedConnectionManagerv - The valuepublic void start()
start in interface CachedConnectionManagerpublic void stop()
stop in interface CachedConnectionManagerpublic void userTransactionStarted()
throws javax.transaction.SystemException
userTransactionStarted in interface UserTransactionListenerjavax.transaction.SystemException - Thrown in case of an errorpublic void popMetaAwareObject(java.util.Set unsharableResources)
throws javax.resource.ResourceException
popMetaAwareObject in interface ComponentStackunsharableResources - a set of real jndi names marked as unshareablejavax.resource.ResourceException - for any errorpublic void registerConnection(ConnectionCacheListener cm, ConnectionListener cl, java.lang.Object connection, javax.resource.spi.ConnectionRequestInfo cri)
registerConnection in interface CachedConnectionManagercm - connection managercl - connection listenerconnection - connection handlecri - connection request info.public void unregisterConnection(ConnectionCacheListener cm, java.lang.Object connection)
unregisterConnection in interface CachedConnectionManagercm - connection managerconnection - connection handlepublic void pushMetaAwareObject(java.lang.Object rawKey,
java.util.Set unsharableResources)
throws javax.resource.ResourceException
pushMetaAwareObject in interface ComponentStackrawKey - the raw key, e.g. the servlet or ejb contextunsharableResources - a set of real jndi names marked as unshareablejavax.resource.ResourceException - for any errorpublic void unregisterConnectionCacheListener(ConnectionCacheListener cm)
unregisterConnectionCacheListener method here.
This is a shutdown method called by a connection manager. It will remove all reference
to that connection manager from the cache, so cached connections from that manager
will never be recoverable.
Possibly this method should not exist.cm - a ConnectionCacheListener valuepublic int getNumberOfConnections()
getNumberOfConnections in interface CachedConnectionManagerpublic java.util.Map<java.lang.String,java.lang.String> listConnections()
listConnections in interface CachedConnectionManagerpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013 IronJacamar (http://www.ironjacamar.org)