Package org.apache.cayenne.tx
Class CayenneTransaction
java.lang.Object
org.apache.cayenne.tx.BaseTransaction
org.apache.cayenne.tx.CayenneTransaction
- All Implemented Interfaces:
Transaction
Represents a Cayenne-managed local Transaction.
- Since:
- 4.0
-
Field Summary
Fields inherited from class org.apache.cayenne.tx.BaseTransaction
connections, defaultIsolationLevel, descriptor, listeners, status, STATUS_ACTIVE, STATUS_COMMITTED, STATUS_COMMITTING, STATUS_MARKED_ROLLEDBACK, STATUS_NO_TRANSACTION, STATUS_ROLLEDBACK, STATUS_ROLLING_BACK
-
Constructor Summary
ConstructorDescriptionCayenneTransaction
(JdbcEventLogger logger) CayenneTransaction
(JdbcEventLogger jdbcEventLogger, TransactionDescriptor descriptor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
begin()
Starts a Transaction.protected void
connectionAdded
(Connection connection) boolean
Is this transaction managed by external transaction managerprotected void
protected void
Methods inherited from class org.apache.cayenne.tx.BaseTransaction
addConnection, addListener, bindThreadTransaction, close, commit, getConnections, getExistingConnection, getOrCreateConnection, getThreadTransaction, isRollbackOnly, rollback, setRollbackOnly
-
Field Details
-
logger
-
-
Constructor Details
-
CayenneTransaction
-
CayenneTransaction
- Since:
- 4.1
-
-
Method Details
-
begin
public void begin()Description copied from class:BaseTransaction
Starts a Transaction. If Transaction is not started explicitly, it will be started when the first connection is added.- Specified by:
begin
in interfaceTransaction
- Overrides:
begin
in classBaseTransaction
-
connectionAdded
- Overrides:
connectionAdded
in classBaseTransaction
-
processCommit
protected void processCommit()- Specified by:
processCommit
in classBaseTransaction
-
processRollback
protected void processRollback()- Specified by:
processRollback
in classBaseTransaction
-
isExternal
public boolean isExternal()Description copied from interface:Transaction
Is this transaction managed by external transaction manager
-