org.jboss.jca.core.tx.jbossts

## Class TransactionManagerDelegator

- java.lang.Object
- - org.jboss.jca.core.tx.jbossts.TransactionManagerDelegator

- All Implemented Interfaces:
    javax.transaction.TransactionManager, org.jboss.jca.core.spi.transaction.TransactionTimeoutConfiguration

      public class TransactionManagerDelegator
      extends java.lang.Object
      implements javax.transaction.TransactionManager, org.jboss.jca.core.spi.transaction.TransactionTimeoutConfiguration

  This class provide a delegator implementation of the transaction manager
  Author:
    Jesper Pedersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransactionManagerDelegator(javax.transaction.TransactionManager tm)` Constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `begin()`
    `void` | `commit()`
    `int` | `getStatus()`
    `long` | `getTimeLeftBeforeTransactionTimeout(boolean errorRollback)` Get the time left before transaction timeout.
    `javax.transaction.Transaction` | `getTransaction()`
    `int` | `getTransactionTimeout()` Get the transaction timeout.
    `void` | `resume(javax.transaction.Transaction tobj)`
    `void` | `rollback()`
    `void` | `setRollbackOnly()`
    `void` | `setTransactionTimeout(int seconds)`
    `javax.transaction.Transaction` | `suspend()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TransactionManagerDelegator

          public TransactionManagerDelegator(javax.transaction.TransactionManager tm)

      Constructor
      Parameters:
        `tm` - The transaction manager

  - ### Method Detail

    - #### begin

          public void begin()
                     throws javax.transaction.NotSupportedException,
                            javax.transaction.SystemException

      Specified by:
        `begin` in interface `javax.transaction.TransactionManager`
      Throws:
        `javax.transaction.NotSupportedException`
        `javax.transaction.SystemException`

    - #### commit

          public void commit()
                      throws javax.transaction.RollbackException,
                             javax.transaction.HeuristicMixedException,
                             javax.transaction.HeuristicRollbackException,
                             java.lang.SecurityException,
                             java.lang.IllegalStateException,
                             javax.transaction.SystemException

      Specified by:
        `commit` in interface `javax.transaction.TransactionManager`
      Throws:
        `javax.transaction.RollbackException`
        `javax.transaction.HeuristicMixedException`
        `javax.transaction.HeuristicRollbackException`
        `java.lang.SecurityException`
        `java.lang.IllegalStateException`
        `javax.transaction.SystemException`

    - #### getStatus

          public int getStatus()
                        throws javax.transaction.SystemException

      Specified by:
        `getStatus` in interface `javax.transaction.TransactionManager`
      Throws:
        `javax.transaction.SystemException`

    - #### getTransaction

          public javax.transaction.Transaction getTransaction()
                                                       throws javax.transaction.SystemException

      Specified by:
        `getTransaction` in interface `javax.transaction.TransactionManager`
      Throws:
        `javax.transaction.SystemException`

    - #### resume

          public void resume(javax.transaction.Transaction tobj)
                      throws javax.transaction.InvalidTransactionException,
                             java.lang.IllegalStateException,
                             javax.transaction.SystemException

      Specified by:
        `resume` in interface `javax.transaction.TransactionManager`
      Throws:
        `javax.transaction.InvalidTransactionException`
        `java.lang.IllegalStateException`
        `javax.transaction.SystemException`

    - #### rollback

          public void rollback()
                        throws java.lang.IllegalStateException,
                               java.lang.SecurityException,
                               javax.transaction.SystemException

      Specified by:
        `rollback` in interface `javax.transaction.TransactionManager`
      Throws:
        `java.lang.IllegalStateException`
        `java.lang.SecurityException`
        `javax.transaction.SystemException`

    - #### setRollbackOnly

          public void setRollbackOnly()
                               throws java.lang.IllegalStateException,
                                      javax.transaction.SystemException

      Specified by:
        `setRollbackOnly` in interface `javax.transaction.TransactionManager`
      Throws:
        `java.lang.IllegalStateException`
        `javax.transaction.SystemException`

    - #### setTransactionTimeout

          public void setTransactionTimeout(int seconds)
                                     throws javax.transaction.SystemException

      Specified by:
        `setTransactionTimeout` in interface `javax.transaction.TransactionManager`
      Throws:
        `javax.transaction.SystemException`

    - #### suspend

          public javax.transaction.Transaction suspend()
                                                throws javax.transaction.SystemException

      Specified by:
        `suspend` in interface `javax.transaction.TransactionManager`
      Throws:
        `javax.transaction.SystemException`

    - #### getTransactionTimeout

          public int getTransactionTimeout()
                                    throws javax.transaction.SystemException

      Get the transaction timeout.
      Specified by:
        `getTransactionTimeout` in interface `org.jboss.jca.core.spi.transaction.TransactionTimeoutConfiguration`
      Returns:
        The timeout in seconds associated with this thread
      Throws:
        `javax.transaction.SystemException` - For any error

    - #### getTimeLeftBeforeTransactionTimeout

          public long getTimeLeftBeforeTransactionTimeout(boolean errorRollback)
                                                   throws javax.transaction.RollbackException

      Get the time left before transaction timeout.
      Specified by:
        `getTimeLeftBeforeTransactionTimeout` in interface `org.jboss.jca.core.spi.transaction.TransactionTimeoutConfiguration`
      Parameters:
        `errorRollback` - throw an error if the transaction is marked for rollback
      Returns:
        The remaining in the current transaction or -1 if there is no transaction
      Throws:
        `javax.transaction.RollbackException` - If the transaction is marked for rollback and errorRollback is true

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)