com.ibm.commerce.foundation.server.services.transaction

Class TransactionService

  • java.lang.Object
    • com.ibm.commerce.foundation.server.services.transaction.TransactionService


  • public class TransactionService
    extends java.lang.Object
    The transaction service is the service for the application that returns the object to help manage the transaction. The transaction service is used to return an instance of a user transaction that is associated with the current request. The user transaction should be used to manage the transaction.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      javax.transaction.UserTransaction begin()
      This method begins the transaction and returns the user transaction associated with the transaction.
      javax.transaction.UserTransaction begin(int timeOut)
      This method begins the transaction and return the user transaction associated with the transaction.
      static TransactionService getInstance()
      This method returns the transaction service instance associated with the application.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static TransactionService getInstance()
        This method returns the transaction service instance associated with the application.
        Returns:
        The transaction service instance associated with the application.
      • begin

        public javax.transaction.UserTransaction begin()
                                                throws javax.transaction.NotSupportedException,
                                                       javax.transaction.SystemException
        This method begins the transaction and returns the user transaction associated with the transaction. The transaction started uses the application's default transaction timeout value.
        Returns:
        Returns the user transaction associated with the transaction. This handle should be used to manage the transaction.
        Throws:
        javax.transaction.NotSupportedException - Thrown if the thread is already associated with a transaction and the Transaction Manager implementation does not support nested transactions.
        javax.transaction.SystemException - Thrown if the transaction manager encounters an unexpected error condition.
      • begin

        public javax.transaction.UserTransaction begin(int timeOut)
                                                throws javax.transaction.NotSupportedException,
                                                       javax.transaction.SystemException
        This method begins the transaction and return the user transaction associated with the transaction.
        Parameters:
        timeOut - The transaction time out value that overrides the application's default transaction timeout.
        Returns:
        Returns the user transaction associated with the transaction. This handle should be used to manage the transaction.
        Throws:
        javax.transaction.NotSupportedException - Thrown if the thread is already associated with a transaction and the Transaction Manager implementation does not support nested transactions.
        javax.transaction.SystemException - Thrown if the transaction manager encounters an unexpected error condition.