org.hibernate.jdbc
类 BorrowedConnectionProxy

java.lang.Object
  继承者 org.hibernate.jdbc.BorrowedConnectionProxy
所有已实现的接口:
InvocationHandler

public class BorrowedConnectionProxy
extends Object
implements InvocationHandler

修改了方法getProxyClassLoader

从以下版本开始:
jdk1.6
作者:
zhangxj-a

构造方法摘要
BorrowedConnectionProxy(org.hibernate.jdbc.ConnectionManager connectionManager)
           
 
方法摘要
static Connection generateProxy(org.hibernate.jdbc.ConnectionManager connectionManager)
          Generates a Connection proxy wrapping the connection managed by the passed connection manager.
static ClassLoader getProxyClassLoader()
          Determines the appropriate class loader to which the generated proxy should be scoped.
static Connection getWrappedConnection(Connection connection)
          Convience method for unwrapping a connection proxy and getting a handle to an underlying connection.
 Object invoke(Object proxy, Method method, Object[] args)
          
static void renderUnuseable(Connection connection)
          Marks a borrowed connection as no longer usable.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

BorrowedConnectionProxy

public BorrowedConnectionProxy(org.hibernate.jdbc.ConnectionManager connectionManager)
方法详细信息

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable

指定者:
接口 InvocationHandler 中的 invoke
抛出:
Throwable

generateProxy

public static Connection generateProxy(org.hibernate.jdbc.ConnectionManager connectionManager)
Generates a Connection proxy wrapping the connection managed by the passed connection manager.

参数:
connectionManager - The connection manager to wrap with the connection proxy.
返回:
The generated proxy.

renderUnuseable

public static void renderUnuseable(Connection connection)
Marks a borrowed connection as no longer usable.

参数:
connection - The connection (proxy) to be marked.

getWrappedConnection

public static Connection getWrappedConnection(Connection connection)
Convience method for unwrapping a connection proxy and getting a handle to an underlying connection.

参数:
connection - The connection (proxy) to be unwrapped.
返回:
The unwrapped connection.

getProxyClassLoader

public static ClassLoader getProxyClassLoader()
Determines the appropriate class loader to which the generated proxy should be scoped.

返回:
The class loader appropriate for proxy construction.


Copyright © 2014 广联达软件股份有限公司(Glodon Software Co., Ltd.). All rights reserved.