Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » jdbc » [javadoc | source]
org.hibernate.jdbc
public class: BorrowedConnectionProxy [javadoc | source]
java.lang.Object
   org.hibernate.jdbc.BorrowedConnectionProxy

All Implemented Interfaces:
    InvocationHandler

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

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

Constructor:
 public BorrowedConnectionProxy(ConnectionManager connectionManager) 
Method from org.hibernate.jdbc.BorrowedConnectionProxy Summary:
generateProxy,   getProxyClassLoader,   getWrappedConnection,   invoke,   renderUnuseable
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.jdbc.BorrowedConnectionProxy Detail:
 public static Connection generateProxy(ConnectionManager connectionManager) 
    Generates a Connection proxy wrapping the connection managed by the passed connection manager.
 public static ClassLoader getProxyClassLoader() 
    Determines the appropriate class loader to which the generated proxy should be scoped.
 public static Connection getWrappedConnection(Connection connection) 
    Convience method for unwrapping a connection proxy and getting a handle to an underlying connection.
 public Object invoke(Object proxy,
    Method method,
    Object[] args) throws Throwable 
    {@inheritDoc}
 public static  void renderUnuseable(Connection connection) 
    Marks a borrowed connection as no longer usable.