|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator
public class ConnectionTrackingCoordinator
ConnectionTrackingCoordinator tracks connections that are in use by components such as EJB's. The component must notify the ccm when a method enters and exits. On entrance, the ccm will notify ConnectionManager stacks so the stack can make sure all connection handles left open from previous method calls are attached to ManagedConnections of the correct security context, and the ManagedConnections are enrolled in any current transaction. On exit, the ccm will notify ConnectionManager stacks of the handles left open, so they may be disassociated if appropriate. In addition, when a UserTransaction is started the ccm will notify ConnectionManager stacks so the existing ManagedConnections can be enrolled properly.
Nested Class Summary | |
---|---|
static class |
ConnectionTrackingCoordinator.ConnectionInvocationHandler
|
Constructor Summary | |
---|---|
ConnectionTrackingCoordinator()
|
|
ConnectionTrackingCoordinator(boolean lazyConnect)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionTrackingCoordinator()
public ConnectionTrackingCoordinator(boolean lazyConnect)
Method Detail |
---|
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 manager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |