public class ConnectionTrackingCoordinator extends Object implements TrackedConnectionAssociator, ConnectionTracker
Modifier and Type | Class and Description |
---|---|
static class |
ConnectionTrackingCoordinator.ConnectionInvocationHandler |
Constructor and Description |
---|
ConnectionTrackingCoordinator() |
ConnectionTrackingCoordinator(boolean lazyConnect) |
Modifier and Type | Method and Description |
---|---|
ConnectorInstanceContext |
enter(ConnectorInstanceContext newContext) |
void |
exit(ConnectorInstanceContext oldContext) |
void |
handleObtained(ConnectionTrackingInterceptor connectionTrackingInterceptor,
ConnectionInfo connectionInfo,
boolean reassociate)
A new connection (handle) has been obtained.
|
void |
handleReleased(ConnectionTrackingInterceptor connectionTrackingInterceptor,
ConnectionInfo connectionInfo,
ConnectionReturnAction connectionReturnAction)
A connection (handle) has been released or destroyed.
|
boolean |
isLazyConnect()
If true, ConnectorInstanceContext instance does not have to be kept on a per component basis; otherwise the
same instance must be passed to enter each time the specific component instance is entered.
|
void |
newTransaction() |
void |
setEnvironment(ConnectionInfo connectionInfo,
String key)
If we are within a component context, before a connection is obtained, set the connection unshareable and
applicationManagedSecurity properties so the correct connection type is obtained.
|
public ConnectionTrackingCoordinator()
public ConnectionTrackingCoordinator(boolean lazyConnect)
public boolean isLazyConnect()
TrackedConnectionAssociator
isLazyConnect
in interface TrackedConnectionAssociator
public ConnectorInstanceContext enter(ConnectorInstanceContext newContext) throws javax.resource.ResourceException
enter
in interface TrackedConnectionAssociator
javax.resource.ResourceException
public void newTransaction() throws javax.resource.ResourceException
newTransaction
in interface TrackedConnectionAssociator
javax.resource.ResourceException
public void exit(ConnectorInstanceContext oldContext) throws javax.resource.ResourceException
exit
in interface TrackedConnectionAssociator
javax.resource.ResourceException
public void handleObtained(ConnectionTrackingInterceptor connectionTrackingInterceptor, ConnectionInfo connectionInfo, boolean reassociate) throws javax.resource.ResourceException
handleObtained
in interface ConnectionTracker
connectionTrackingInterceptor
- our interceptor in the connection manager which is used to disassociate the connectionsconnectionInfo
- the connection that was obtainedreassociate
- javax.resource.ResourceException
public void handleReleased(ConnectionTrackingInterceptor connectionTrackingInterceptor, ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
handleReleased
in interface ConnectionTracker
connectionTrackingInterceptor
- our interceptor in the connection managerconnectionInfo
- the connection that was releasedconnectionReturnAction
- public void setEnvironment(ConnectionInfo connectionInfo, String key)
setEnvironment
in interface ConnectionTracker
connectionInfo
- the connection to be obtainedkey
- the unique id of the connection managerCopyright © 2016. All rights reserved.