org.apache.openejb.resource
Class AutoConnectionTracker
java.lang.Object
org.apache.openejb.resource.AutoConnectionTracker
- All Implemented Interfaces:
- org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker
public class AutoConnectionTracker
- extends java.lang.Object
- implements org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker
Method Summary |
void |
handleObtained(org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor interceptor,
org.apache.geronimo.connector.outbound.ConnectionInfo connectionInfo,
boolean reassociate)
Proxies new connection handles so we can detect when they have been garbage collected. |
void |
handleReleased(org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor interceptor,
org.apache.geronimo.connector.outbound.ConnectionInfo connectionInfo,
org.apache.geronimo.connector.outbound.ConnectionReturnAction action)
Removes the released collection from the garbage collection reference tracker, since this
connection is being release via a normal close method. |
void |
setEnvironment(org.apache.geronimo.connector.outbound.ConnectionInfo connectionInfo,
java.lang.String key)
Releases any managed connections held by a garbage collected connection proxy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AutoConnectionTracker
public AutoConnectionTracker()
setEnvironment
public void setEnvironment(org.apache.geronimo.connector.outbound.ConnectionInfo connectionInfo,
java.lang.String key)
- Releases any managed connections held by a garbage collected connection proxy.
- Specified by:
setEnvironment
in interface org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker
- Parameters:
connectionInfo
- the connection to be obtainedkey
- the unique id of the connection manager
handleObtained
public void handleObtained(org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor interceptor,
org.apache.geronimo.connector.outbound.ConnectionInfo connectionInfo,
boolean reassociate)
throws javax.resource.ResourceException
- Proxies new connection handles so we can detect when they have been garbage collected.
- Specified by:
handleObtained
in interface org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker
- Parameters:
interceptor
- the interceptor used to release the managed connection when the handled is garbage collected.connectionInfo
- the connection that was obtainedreassociate
- should always be false
- Throws:
javax.resource.ResourceException
handleReleased
public void handleReleased(org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor interceptor,
org.apache.geronimo.connector.outbound.ConnectionInfo connectionInfo,
org.apache.geronimo.connector.outbound.ConnectionReturnAction action)
- Removes the released collection from the garbage collection reference tracker, since this
connection is being release via a normal close method.
- Specified by:
handleReleased
in interface org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTracker
- Parameters:
interceptor
- ignoredconnectionInfo
- the connection that was releasedaction
- ignored
Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.