Interface TransactionService

All Known Implementing Classes:
AbstractTransactionService, JBossTransactionService, TransactionsEssentialsTransactionService

public interface TransactionService
Created by The eXo Platform SAS.
The transaction service
Version:
$Id: $
Author:
Gennady Azarenkov
  • Method Details

    • getTransactionManager

      javax.transaction.TransactionManager getTransactionManager()
      Returns:
      TransactionManager
    • getUserTransaction

      javax.transaction.UserTransaction getUserTransaction()
      Returns:
      UserTransaction
    • getDefaultTimeout

      int getDefaultTimeout()
      Returns:
      default timeout in seconds
    • setTransactionTimeout

      void setTransactionTimeout(int seconds) throws javax.transaction.SystemException
      Sets timeout in seconds,
      Parameters:
      seconds - int
      Throws:
      javax.transaction.SystemException
    • enlistResource

      boolean enlistResource(XAResource xares) throws javax.transaction.RollbackException, javax.transaction.SystemException, IllegalStateException
      Enlists XA resource in transaction manager.
      Parameters:
      xares - XAResource
      Returns:
      true if the resource was enlisted successfully; otherwise false.
      Throws:
      javax.transaction.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.
      javax.transaction.SystemException - Thrown if the transaction manager encounters an unexpected error condition.
    • delistResource

      boolean delistResource(XAResource xares) throws javax.transaction.RollbackException, javax.transaction.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.
      javax.transaction.SystemException - Thrown if the transaction manager encounters an unexpected error condition.
      javax.transaction.RollbackException