@Component(value="cuba_Transactions") public class TransactionsImpl extends java.lang.Object implements Transactions
| Modifier and Type | Field and Description |
|---|---|
protected BeanLocator |
beanLocator |
protected PersistenceImpl |
persistence |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
NAME| Constructor and Description |
|---|
TransactionsImpl() |
| Modifier and Type | Method and Description |
|---|---|
Transaction |
create()
Creates a new transaction in the main data store.
|
Transaction |
create(java.lang.String storeName)
Creates a new transaction.
If there is an active transaction, it will be suspended. |
Transaction |
create(java.lang.String storeName,
TransactionParams params)
Creates a new transaction.
If there is an active transaction, it will be suspended. |
Transaction |
create(TransactionParams params)
Creates a new transaction in the main data store.
|
Transaction |
get()
Creates a new transaction in the main data store if there is no one at the moment.
|
Transaction |
get(java.lang.String storeName)
Creates a new transaction if there is no one at the moment.
|
protected org.springframework.transaction.PlatformTransactionManager |
getTransactionManager(java.lang.String store) |
@Inject @Named(value="transactionManager") protected org.springframework.transaction.PlatformTransactionManager transactionManager
@Inject protected PersistenceImpl persistence
@Inject protected BeanLocator beanLocator
public Transaction create(TransactionParams params)
Transactionscreate in interface TransactionsTransactions.create(String, TransactionParams)public Transaction create(java.lang.String storeName, TransactionParams params)
Transactionscreate in interface TransactionsstoreName - data store nameparams - new transaction parameterspublic Transaction create()
Transactionscreate in interface TransactionsTransactions.create(String)public Transaction create(java.lang.String storeName)
Transactionscreate in interface TransactionsstoreName - data store namepublic Transaction get()
Transactionsget in interface TransactionsTransactions.get(String)public Transaction get(java.lang.String storeName)
TransactionsIf a transaction exists, joins the current transaction. In this case:
Transaction.commit() does not affect current transaction.Transaction.end() is called without previous Transaction.commit(), current
transaction is marked as rollback-only, so any attempt to commit the surrounding Transaction will
throw an exception.get in interface TransactionsstoreName - data store nameprotected org.springframework.transaction.PlatformTransactionManager getTransactionManager(java.lang.String store)