org.jboss.jca.core.connectionmanager.listener

## Class TxConnectionListener.TransactionSynchronization

- java.lang.Object
- - org.jboss.jca.core.connectionmanager.listener.TxConnectionListener.TransactionSynchronization

- All Implemented Interfaces:
    javax.transaction.Synchronization
  Enclosing class:
    TxConnectionListener

      public class TxConnectionListener.TransactionSynchronization
      extends java.lang.Object
      implements javax.transaction.Synchronization

  Transaction sync. class. Please note this class has public access is for test purposes only. Except for test purposes it should be considered private! Don't use it outside enclosing class or testcase!

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected javax.transaction.Transaction` | `currentTx` Transaction

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TransactionSynchronization(javax.transaction.Transaction tx, boolean trackByTx)` Create a new TransactionSynchronization.transaction

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterCompletion(int status)`
    `void` | `beforeCompletion()`
    `void` | `cancel()` Set the cancel flag
    `void` | `checkEnlisted()` Get the result of the enlistment.
    `boolean` | `enlist()` Enlist the resource
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### currentTx

          protected final javax.transaction.Transaction currentTx

      Transaction

  - ### Constructor Detail

    - #### TransactionSynchronization

          public TransactionSynchronization(javax.transaction.Transaction tx,
                                            boolean trackByTx)

      Create a new TransactionSynchronization.transaction
      Parameters:
        `tx` - transaction
        `trackByTx` - whether this is track by connection

  - ### Method Detail

    - #### cancel

          public void cancel()

      Set the cancel flag

    - #### checkEnlisted

          public void checkEnlisted()
                             throws javax.transaction.SystemException

      Get the result of the enlistment.
      Throws:
        `javax.transaction.SystemException` - for any error

    - #### enlist

          public boolean enlist()

      Enlist the resource
      Returns:
        true when enlisted, false otherwise

    - #### beforeCompletion

          public void beforeCompletion()

      Specified by:
        `beforeCompletion` in interface `javax.transaction.Synchronization`

    - #### afterCompletion

          public void afterCompletion(int status)

      Specified by:
        `afterCompletion` in interface `javax.transaction.Synchronization`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

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