public class DefaultTransactionManager extends Object implements TransactionManager
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DefaultTransactionManager.BaseTransactionHandler |
| Constructor and Description |
|---|
DefaultTransactionManager(TransactionFactory txFactory,
JdbcEventLogger jdbcEventLogger) |
| Modifier and Type | Method and Description |
|---|---|
protected DefaultTransactionManager.BaseTransactionHandler |
getHandler(TransactionDescriptor descriptor) |
<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,
TransactionDescriptor descriptor)
Performs operation in a transaction which parameters described by descriptor.
|
<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. |
<T> T |
performInTransaction(TransactionalOperation<T> op,
TransactionListener callback,
TransactionDescriptor descriptor)
Performs operation in a transaction which parameters described by descriptor.
|
public DefaultTransactionManager(TransactionFactory txFactory, JdbcEventLogger jdbcEventLogger)
public <T> T performInTransaction(TransactionalOperation<T> op)
TransactionManagerTransactionalOperation.perform(), and then committing or rolling back the
transaction.performInTransaction in interface TransactionManagerT - returned value typeop - an operation to perform within the transaction.public <T> T performInTransaction(TransactionalOperation<T> op, TransactionListener callback)
TransactionManagerTransactionalOperation.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 TransactionManagerT - returned value typeop - an operation to perform within the transaction.callback - a callback to notify as transaction progresses through stages.public <T> T performInTransaction(TransactionalOperation<T> op, TransactionDescriptor descriptor)
TransactionManagerperformInTransaction in interface TransactionManagerT - result typeop - an operation to perform within the transaction.descriptor - transaction descriptorpublic <T> T performInTransaction(TransactionalOperation<T> op, TransactionListener callback, TransactionDescriptor descriptor)
TransactionManagerperformInTransaction in interface TransactionManagerT - returned value typeop - an operation to perform within the transaction.callback - a callback to notify as transaction progresses through stages.descriptor - transaction descriptorprotected DefaultTransactionManager.BaseTransactionHandler getHandler(TransactionDescriptor descriptor)
Copyright © 2001–2021 Apache Cayenne. All rights reserved.