Package org.apache.batchee.spi

## Interface TransactionManagerAdapter

- All Known Implementing Classes:
    `DefaultNonTransactionalManager`, `JTAUserTransactionAdapter`

      public interface TransactionManagerAdapter

  We have this interface so that we do not try to load the Java EE UserTransaction in an SE environment

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `begin()` | Create a new transaction and associate it with the current thread.
    `void` | `commit()` | Complete the transaction associated with the current thread.
    `int` | `getStatus()` | Obtain the status of the transaction associated with the current thread.
    `void` | `rollback()` | Roll back the transaction associated with the current thread.
    `void` | `setRollbackOnly()` | Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.
    `void` | `setTransactionTimeout​(int arg0)` | Modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method.

- - ### Method Detail

    - #### begin

          void begin()

      Create a new transaction and associate it with the current thread.

    - #### commit

          void commit()

      Complete the transaction associated with the current thread.

    - #### getStatus

          int getStatus()

      Obtain the status of the transaction associated with the current thread.
      Returns:
        The transaction status.

    - #### rollback

          void rollback()

      Roll back the transaction associated with the current thread. When this method completes, the thread becomes associated with no transaction. Attention: this must not throw an Exception until there is a setup problem! So if the tx is not active anymore and we get an Exception while trying to rollback then it MUST get catched away. Otoh if there is a setup or system issue the Exception from the rollback needs to get thrown.

    - #### setRollbackOnly

          void setRollbackOnly()

      Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.

    - #### setTransactionTimeout

          void setTransactionTimeout​(int arg0)

      Modify the value of the timeout value that is associated with the transactions started by the current thread with the begin method.
      Parameters:
        `arg0` - seconds - The value of the timeout in seconds. If the value is zero, the transaction service restores the default value.