public class BorrowedConnectionProxy
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Session.connection() for application usage.| Constructor and Description |
|---|
BorrowedConnectionProxy(ConnectionManager connectionManager) |
| Modifier and Type | Method and Description |
|---|---|
static java.sql.Connection |
generateProxy(ConnectionManager connectionManager)
Generates a Connection proxy wrapping the connection managed by the passed
connection manager.
|
static java.lang.ClassLoader |
getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy
should be scoped.
|
static java.sql.Connection |
getWrappedConnection(java.sql.Connection connection)
Convience method for unwrapping a connection proxy and getting a
handle to an underlying connection.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
static void |
renderUnuseable(java.sql.Connection connection)
Marks a borrowed connection as no longer usable.
|
public BorrowedConnectionProxy(ConnectionManager connectionManager)
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.Throwablepublic static java.sql.Connection generateProxy(ConnectionManager connectionManager)
connectionManager - The connection manager to wrap with the
connection proxy.public static void renderUnuseable(java.sql.Connection connection)
connection - The connection (proxy) to be marked.public static java.sql.Connection getWrappedConnection(java.sql.Connection connection)
connection - The connection (proxy) to be unwrapped.public static java.lang.ClassLoader getProxyClassLoader()
Copyright © 2013. All Rights Reserved.