public abstract class SpringManagedTransaction extends Object implements com.holonplatform.core.datastore.transaction.Transaction
Transaction implementation which uses a Spring PlatformTransactionManager to manage the actual
transaction.
startTransaction() and endTransaction() methods should be used to handle transaction lifecycle.com.holonplatform.core.datastore.transaction.TransactionStatus.IllegalTransactionStatusException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException, com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionNotSupportedException| Constructor and Description |
|---|
SpringManagedTransaction(org.springframework.transaction.PlatformTransactionManager transactionManager,
com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
commit() |
com.holonplatform.core.datastore.transaction.TransactionConfiguration |
getConfiguration()
Get the transaction configuration.
|
boolean |
isCompleted() |
boolean |
isRollbackOnly() |
void |
rollback() |
void |
setRollbackOnly() |
public SpringManagedTransaction(org.springframework.transaction.PlatformTransactionManager transactionManager,
com.holonplatform.core.datastore.transaction.TransactionConfiguration configuration)
transactionManager - The PlatformTransactionManager to use (not null)configuration - The transaction configuration (not null)public com.holonplatform.core.datastore.transaction.TransactionConfiguration getConfiguration()
public boolean commit()
throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException
commit in interface com.holonplatform.core.datastore.transaction.Transactioncom.holonplatform.core.datastore.transaction.TransactionStatus.TransactionExceptionpublic void rollback()
throws com.holonplatform.core.datastore.transaction.TransactionStatus.TransactionException
rollback in interface com.holonplatform.core.datastore.transaction.Transactioncom.holonplatform.core.datastore.transaction.TransactionStatus.TransactionExceptionpublic boolean isCompleted()
isCompleted in interface com.holonplatform.core.datastore.transaction.TransactionStatuspublic void setRollbackOnly()
setRollbackOnly in interface com.holonplatform.core.datastore.transaction.TransactionStatuspublic boolean isRollbackOnly()
isRollbackOnly in interface com.holonplatform.core.datastore.transaction.TransactionStatusCopyright © 2019 The Holon Platform. All rights reserved.