org.hibernate.jdbc
Class BorrowedConnectionProxy

java.lang.Object
  extended byorg.hibernate.jdbc.BorrowedConnectionProxy
All Implemented Interfaces:
InvocationHandler

public class BorrowedConnectionProxy
extends Object
implements InvocationHandler

A proxy for borrowed connections which funnels all requests back into the JDBCContext to be properly handled (in terms of connection release modes).

Note: the term borrowed here refers to connection references obtained via Session.connection() for application usage.

Author:
Steve Ebersole

Constructor Summary
BorrowedConnectionProxy(JDBCContext jdbcContext)
           
 
Method Summary
static Connection generateProxy(JDBCContext jdbcContext)
           
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BorrowedConnectionProxy

public BorrowedConnectionProxy(JDBCContext jdbcContext)
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

generateProxy

public static Connection generateProxy(JDBCContext jdbcContext)