public class TransactionContextManager extends Object
PlatformTransactionManager instance, to be able to wrap the
returned TransactionStatus instances into TransactionContext. TransactionContext implements
AutoCloseable, so it can be used in try-with-resources blocks. For more information see TransactionContext.TransactionContext| Modifier and Type | Method and Description |
|---|---|
void |
commit(TransactionContext context) |
TransactionContext |
getActiveTransaction() |
TransactionContext |
getNewTransaction(int propagation)
Begins a new transaction or returns an existing, depending on the passed Transaction Propagation.
|
void |
rollback(TransactionContext context) |
public TransactionContext getNewTransaction(int propagation)
TransactionContext which is AutoCloseable and allows using
the wrapper inside a try-with-resources block.propagation - The transaction propagation to use.public TransactionContext getActiveTransaction()
public void commit(TransactionContext context)
public void rollback(TransactionContext context)
Copyright © 2024 The Apache Software Foundation. All rights reserved.