public class AutoConnectionTracker
extends java.lang.Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | AutoConnectionTracker.ConnectionInvocationHandler | 
| Constructor and Description | 
|---|
| AutoConnectionTracker(boolean cleanupLeakedConnections) | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.Set<ManagedConnectionInfo> | connections() | 
| void | handleObtained(ConnectionTrackingInterceptor interceptor,
              ConnectionInfo connectionInfo,
              boolean reassociate)Proxies new connection handles so we can detect when they have been garbage collected. | 
| void | handleReleased(ConnectionTrackingInterceptor interceptor,
              ConnectionInfo connectionInfo,
              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(ConnectionInfo connectionInfo,
              java.lang.String key)Releases any managed connections held by a garbage collected connection proxy. | 
| static java.lang.String | stackTraceToString(java.lang.StackTraceElement[] stackTrace) | 
public AutoConnectionTracker(boolean cleanupLeakedConnections)
public java.util.Set<ManagedConnectionInfo> connections()
public void setEnvironment(ConnectionInfo connectionInfo,
                           java.lang.String key)
connectionInfo - the connection to be obtainedkey - the unique id of the connection managerpublic void handleObtained(ConnectionTrackingInterceptor interceptor,
                           ConnectionInfo connectionInfo,
                           boolean reassociate)
                    throws ResourceException
interceptor - the interceptor used to release the managed connection when the handled is garbage collected.connectionInfo - the connection that was obtainedreassociate - should always be falseResourceExceptionpublic void handleReleased(ConnectionTrackingInterceptor interceptor,
                           ConnectionInfo connectionInfo,
                           ConnectionReturnAction action)
interceptor - ignoredconnectionInfo - the connection that was releasedaction - ignoredpublic static java.lang.String stackTraceToString(java.lang.StackTraceElement[] stackTrace)