private class LazyConnectionDataSourceProxy.LazyConnectionInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
autoCommit |
private boolean |
closed |
private java.lang.String |
password |
private java.lang.Boolean |
readOnly |
private java.sql.Connection |
target |
private java.lang.Integer |
transactionIsolation |
private java.lang.String |
username |
Constructor and Description |
---|
LazyConnectionInvocationHandler() |
LazyConnectionInvocationHandler(java.lang.String username,
java.lang.String password) |
Modifier and Type | Method and Description |
---|---|
private java.sql.Connection |
getTargetConnection(java.lang.reflect.Method operation)
Return the target Connection, fetching it and initializing it if necessary.
|
private boolean |
hasTargetConnection()
Return whether the proxy currently holds a target Connection.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
private java.lang.String username
private java.lang.String password
private java.lang.Boolean readOnly
private java.lang.Integer transactionIsolation
private java.lang.Boolean autoCommit
private boolean closed
private java.sql.Connection target
public LazyConnectionInvocationHandler()
public LazyConnectionInvocationHandler(java.lang.String username, java.lang.String password)
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.InvocationHandler
java.lang.Throwable
private boolean hasTargetConnection()
private java.sql.Connection getTargetConnection(java.lang.reflect.Method operation) throws java.sql.SQLException
java.sql.SQLException