Interface TransactionService
-
- All Known Implementing Classes:
AbstractTransactionService,JBossTransactionService,TransactionsEssentialsTransactionService
public interface TransactionServiceCreated by The eXo Platform SAS.
The transaction service- Version:
- $Id: $
- Author:
- Gennady Azarenkov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleandelistResource(XAResource xares)Delists XA resource from transaction manager.booleanenlistResource(XAResource xares)Enlists XA resource in transaction manager.intgetDefaultTimeout()TransactionManagergetTransactionManager()UserTransactiongetUserTransaction()voidsetTransactionTimeout(int seconds)Sets timeout in seconds,
-
-
-
Method Detail
-
getTransactionManager
TransactionManager getTransactionManager()
- Returns:
- TransactionManager
-
getUserTransaction
UserTransaction getUserTransaction()
- Returns:
- UserTransaction
-
getDefaultTimeout
int getDefaultTimeout()
- Returns:
- default timeout in seconds
-
setTransactionTimeout
void setTransactionTimeout(int seconds) throws SystemExceptionSets timeout in seconds,- Parameters:
seconds- int- Throws:
SystemException
-
enlistResource
boolean enlistResource(XAResource xares) throws RollbackException, SystemException, IllegalStateException
Enlists XA resource in transaction manager.- Parameters:
xares- XAResource- Returns:
- true if the resource was enlisted successfully; otherwise false.
- Throws:
RollbackException- Thrown to indicate that the transaction has been marked for rollback only.IllegalStateException- Thrown if the transaction in the target object is in the prepared state or the transaction is inactive.SystemException- Thrown if the transaction manager encounters an unexpected error condition.
-
delistResource
boolean delistResource(XAResource xares) throws RollbackException, SystemException, IllegalStateException
Delists XA resource from transaction manager.- Parameters:
xares- XAResource- Returns:
- true if the resource was delisted successfully; otherwise false.
- Throws:
IllegalStateException- Thrown if the transaction in the target object is inactive.SystemException- Thrown if the transaction manager encounters an unexpected error condition.RollbackException
-
-