|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jolbox.bonecp.MemorizeTransactionProxy
public class MemorizeTransactionProxy
This code takes care of recording and playing back of transactions (when a failure occurs). The idea behind this is to wrap a connection or statement with proxies and log all method calls. When a failure occurs, thrash the inner connection, obtain a new one and play back the previously recorded methods.
| Constructor Summary | |
|---|---|
MemorizeTransactionProxy()
Default constructor. |
|
| Method Summary | |
|---|---|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
protected static CallableStatement |
memorize(CallableStatement target,
ConnectionHandle connectionHandle)
Wrap CallableStatement with a proxy. |
protected static Connection |
memorize(Connection target,
ConnectionHandle connectionHandle)
Wrap connection with a proxy. |
protected static PreparedStatement |
memorize(PreparedStatement target,
ConnectionHandle connectionHandle)
Wrap PreparedStatement with a proxy. |
protected static Statement |
memorize(Statement target,
ConnectionHandle connectionHandle)
Wrap Statement with a proxy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemorizeTransactionProxy()
| Method Detail |
|---|
protected static Connection memorize(Connection target,
ConnectionHandle connectionHandle)
target - connection handleconnectionHandle - originating bonecp connection
protected static Statement memorize(Statement target,
ConnectionHandle connectionHandle)
target - statement handleconnectionHandle - originating bonecp connection
protected static PreparedStatement memorize(PreparedStatement target,
ConnectionHandle connectionHandle)
target - statement handleconnectionHandle - originating bonecp connection
protected static CallableStatement memorize(CallableStatement target,
ConnectionHandle connectionHandle)
target - statement handleconnectionHandle - originating bonecp connection
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
invoke in interface InvocationHandlerThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||