public class DefaultTransactionManager extends Object implements TransactionManager
Constructor and Description |
---|
DefaultTransactionManager(TransactionFactory txFactory,
JdbcEventLogger jdbcEventLogger) |
Modifier and Type | Method and Description |
---|---|
protected <T> T |
performInLocalTransaction(TransactionalOperation<T> op,
TransactionListener callback) |
<T> T |
performInTransaction(TransactionalOperation<T> op)
Starts a new transaction (or joins an existing one) calling
TransactionalOperation.perform() , and then committing or rolling back the
transaction. |
<T> T |
performInTransaction(TransactionalOperation<T> op,
TransactionListener callback)
Starts a new transaction (or joins an existing one) calling
TransactionalOperation.perform() , and then committing or rolling back the
transaction. |
protected <T> T |
performInTransaction(Transaction tx,
TransactionalOperation<T> op,
TransactionListener callback) |
public DefaultTransactionManager(TransactionFactory txFactory, JdbcEventLogger jdbcEventLogger)
public <T> T performInTransaction(TransactionalOperation<T> op)
TransactionManager
TransactionalOperation.perform()
, and then committing or rolling back the
transaction.performInTransaction
in interface TransactionManager
op
- an operation to perform within the trsnaction.public <T> T performInTransaction(TransactionalOperation<T> op, TransactionListener callback)
TransactionManager
TransactionalOperation.perform()
, and then committing or rolling back the
transaction. As transaction goes through stages, callback methods are invoked allowing the caller to customize
transaction parameters.performInTransaction
in interface TransactionManager
op
- an operation to perform within the trsnaction.callback
- a callback to notify as transaction progresses through stages.protected <T> T performInLocalTransaction(TransactionalOperation<T> op, TransactionListener callback)
protected <T> T performInTransaction(Transaction tx, TransactionalOperation<T> op, TransactionListener callback)
Copyright © 2001–2017 Apache Cayenne. All rights reserved.