|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler
public class AttributeRestoringConnectionInvocationHandler
Protects a
's attributes from being permanently modfied.
Connection
Wraps a provided
such that its auto
commit and transaction isolation attributes can be overwritten, but
will automatically restored to their original values when the connection
is actually closed (and potentially returned to a pool for reuse).
Connection
JobStoreSupport.getConnection()
,
JobStoreCMT.getNonManagedTXConnection()
Constructor Summary | |
---|---|
AttributeRestoringConnectionInvocationHandler(java.sql.Connection conn)
|
Method Summary | |
---|---|
void |
close()
Attempts to restore the auto commit and transaction isolation connection attributes of the wrapped connection to their original values (if they were overwritten), before finally actually closing the wrapped connection. |
protected org.slf4j.Logger |
getLog()
|
java.sql.Connection |
getWrappedConnection()
Gets the underlying connection to which all operations ultimately defer. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
void |
restoreOriginalAtributes()
Attempts to restore the auto commit and transaction isolation connection attributes of the wrapped connection to their original values (if they were overwritten). |
void |
setAutoCommit(boolean autoCommit)
Sets this connection's auto-commit mode to the given state, saving the original mode. |
void |
setTransactionIsolation(int level)
Attempts to change the transaction isolation level to the given level, saving the original level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeRestoringConnectionInvocationHandler(java.sql.Connection conn)
Method Detail |
---|
protected org.slf4j.Logger getLog()
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
public void setAutoCommit(boolean autoCommit) throws java.sql.SQLException
java.sql.SQLException
public void setTransactionIsolation(int level) throws java.sql.SQLException
java.sql.SQLException
public java.sql.Connection getWrappedConnection()
java.sql.Connection
interface.
public void restoreOriginalAtributes()
public void close() throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |