Package org.apache.cayenne.tx
Interface TransactionListener
public interface TransactionListener
A callback that is notified as transaction progresses through stages. It can customize transaction isolation level,
etc.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault Connection
decorateConnection
(Transaction tx, Connection connection) This method could be used to decorate or substitute new connection initiated inside a Cayenne transaction.void
willAddConnection
(Transaction tx, String connectionName, Connection connection) void
void
-
Method Details
-
willCommit
-
willRollback
-
willAddConnection
-
decorateConnection
This method could be used to decorate or substitute new connection initiated inside a Cayenne transaction.
The default implementation returns the same connection.- Parameters:
tx
- transaction that initiated connectionconnection
- connection (it could be decorated by other listeners)- Returns:
- connection
- Since:
- 4.2
-