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()
TrackedConnectionAssociatorisLazyConnect in interface TrackedConnectionAssociatorpublic ConnectorInstanceContext enter(ConnectorInstanceContext newContext) throws javax.resource.ResourceException
enter in interface TrackedConnectionAssociatorjavax.resource.ResourceExceptionpublic void newTransaction()
throws javax.resource.ResourceException
newTransaction in interface TrackedConnectionAssociatorjavax.resource.ResourceExceptionpublic void exit(ConnectorInstanceContext oldContext) throws javax.resource.ResourceException
exit in interface TrackedConnectionAssociatorjavax.resource.ResourceExceptionpublic void handleObtained(ConnectionTrackingInterceptor connectionTrackingInterceptor, ConnectionInfo connectionInfo, boolean reassociate) throws javax.resource.ResourceException
handleObtained in interface ConnectionTrackerconnectionTrackingInterceptor - our interceptor in the connection manager which is used to disassociate the connectionsconnectionInfo - the connection that was obtainedreassociate - javax.resource.ResourceExceptionpublic void handleReleased(ConnectionTrackingInterceptor connectionTrackingInterceptor, ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
handleReleased in interface ConnectionTrackerconnectionTrackingInterceptor - our interceptor in the connection managerconnectionInfo - the connection that was releasedconnectionReturnAction - public void setEnvironment(ConnectionInfo connectionInfo, String key)
setEnvironment in interface ConnectionTrackerconnectionInfo - the connection to be obtainedkey - the unique id of the connection managerCopyright © 2023. All rights reserved.