XAResourceTransaction (Transactions JTA 4.0.6 API)
Date: 2018-01-11

com.atomikos.datasource.xa

## Class XAResourceTransaction

- java.lang.Object
- - com.atomikos.datasource.xa.XAResourceTransaction

- All Implemented Interfaces:
    ResourceTransaction, Participant, java.io.Serializable

      public class XAResourceTransaction
      extends java.lang.Object
      implements ResourceTransaction, Participant

  An implementation of ResourceTransaction for XA transactions.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from interface com.atomikos.icatch.Participant

      `READ_ONLY`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `commit(boolean onePhase)`
    `boolean` | `equals(java.lang.Object o)` Absolutely necessary for coordinator to work correctly
    `void` | `forget()`
    `java.lang.String` | `getResourceName()`
    `java.lang.Object` | `getState()`
    `java.lang.String` | `getTid()`
    `java.lang.String` | `getURI()`
    `javax.transaction.xa.Xid` | `getXid()` Get the Xid.
    `int` | `hashCode()` Absolutely necessary for coordinator to work correctly
    `boolean` | `isActive()` Test if the restx is active (in use).
    `boolean` | `isRecoverable()`
    `boolean` | `isXaSuspended()` Test if the resource has been ended with TMSUSPEND.
    `int` | `prepare()`
    `void` | `resume()`
    `void` | `rollback()`
    `void` | `setCascadeList(java.util.Map<java.lang.String,java.lang.Integer> allParticipants)`
    `void` | `setGlobalSiblingCount(int count)`
    `void` | `setXAResource(javax.transaction.xa.XAResource xaresource)` Set the XAResource attribute.
    `void` | `suspend()`
    `protected void` | `testOrRefreshXAResourceFor2PC()`
    `java.lang.String` | `toString()`
    `void` | `xaResume()` Perform an xa resume
    `void` | `xaSuspend()` Perform an XA suspend.

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

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

- - ### Method Detail

    - #### testOrRefreshXAResourceFor2PC

          protected void testOrRefreshXAResourceFor2PC()
                                                throws javax.transaction.xa.XAException

      Throws:
        `javax.transaction.xa.XAException`

    - #### getTid

          public java.lang.String getTid()

      See Also:
        `ResourceTransaction.`

    - #### suspend

          public void suspend()
                       throws ResourceException

      Specified by:
        `suspend` in interface `ResourceTransaction`
      Throws:
        `ResourceException`
      See Also:
        `ResourceTransaction.`

    - #### resume

          public void resume()
                      throws ResourceException

      Specified by:
        `resume` in interface `ResourceTransaction`
      Throws:
        `ResourceException`
      See Also:
        `ResourceTransaction.`

    - #### setCascadeList

          public void setCascadeList(java.util.Map<java.lang.String,java.lang.Integer> allParticipants)
                              throws SysException

      Specified by:
        `setCascadeList` in interface `Participant`
      Throws:
        `SysException`
      See Also:
        `Participant`

    - #### getState

          public java.lang.Object getState()

    - #### setGlobalSiblingCount

          public void setGlobalSiblingCount(int count)

      Specified by:
        `setGlobalSiblingCount` in interface `Participant`
      See Also:
        `Participant`

    - #### forget

          public void forget()

      Specified by:
        `forget` in interface `Participant`
      See Also:
        `Participant`

    - #### prepare

          public int prepare()
                      throws RollbackException,
                             HeurHazardException,
                             HeurMixedException,
                             SysException

      Specified by:
        `prepare` in interface `Participant`
      Throws:
        `RollbackException`
        `HeurHazardException`
        `HeurMixedException`
        `SysException`
      See Also:
        `Participant`

    - #### rollback

          public void rollback()
                        throws HeurCommitException,
                               HeurMixedException,
                               HeurHazardException,
                               SysException

      Specified by:
        `rollback` in interface `Participant`
      Throws:
        `HeurCommitException`
        `HeurMixedException`
        `HeurHazardException`
        `SysException`
      See Also:
        `Participant.`

    - #### commit

          public void commit(boolean onePhase)
                      throws HeurRollbackException,
                             HeurHazardException,
                             HeurMixedException,
                             RollbackException,
                             SysException

      Specified by:
        `commit` in interface `Participant`
      Throws:
        `HeurRollbackException`
        `HeurHazardException`
        `HeurMixedException`
        `RollbackException`
        `SysException`
      See Also:
        `Participant`

    - #### equals

          public boolean equals(java.lang.Object o)

      Absolutely necessary for coordinator to work correctly
      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Absolutely necessary for coordinator to work correctly
      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

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

    - #### getXid

          public javax.transaction.xa.Xid getXid()

      Get the Xid. Needed by jta mappings.
      Returns:
        Xid The Xid of this restx.

    - #### setXAResource

          public void setXAResource(javax.transaction.xa.XAResource xaresource)

      Set the XAResource attribute.
      Parameters:
        `xaresource` - The new XAResource to use. This new XAResource represents the new connection to the XA database. Necessary because on reuse, the old xaresource may be in use by another thread, for another transaction.

    - #### xaSuspend

          public void xaSuspend()
                         throws javax.transaction.xa.XAException

      Perform an XA suspend.
      Throws:
        `javax.transaction.xa.XAException`

    - #### xaResume

          public void xaResume()
                        throws javax.transaction.xa.XAException

      Perform an xa resume
      Throws:
        `javax.transaction.xa.XAException`

    - #### isXaSuspended

          public boolean isXaSuspended()

      Test if the resource has been ended with TMSUSPEND.
      Returns:
        boolean True if so.

    - #### isActive

          public boolean isActive()

      Test if the restx is active (in use).
      Returns:
        boolean True if so.

    - #### getURI

          public java.lang.String getURI()

      Specified by:
        `getURI` in interface `Participant`
      See Also:
        `Participant.getURI()`

    - #### getResourceName

          public java.lang.String getResourceName()

      Specified by:
        `getResourceName` in interface `Participant`

    - #### isRecoverable

          public boolean isRecoverable()

      Specified by:
        `isRecoverable` in interface `Participant`

Copyright © 2018. All Rights Reserved.