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

com.atomikos.icatch.jta

## Class UserTransactionServerImp

- java.lang.Object
- - com.atomikos.icatch.jta.UserTransactionServerImp

- All Implemented Interfaces:
    UserTransactionServer, java.rmi.Remote

      public class UserTransactionServerImp
      extends java.lang.Object
      implements UserTransactionServer

  An implementation of the server-side UserTransaction infrastructure. An instance of this class is created and exported automatically (when client-demarcated transactions are enabled).

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `begin(int timeout)` Create a new transaction.
    `void` | `commit(java.lang.String tid)` Commit the transaction.
    `java.lang.String` | `getName()` Get the name on which this instance is listening in RMI.
    `static UserTransactionServerImp` | `getSingleton()`
    `int` | `getStatus(java.lang.String tid)` Get the status of the transaction.
    `javax.transaction.UserTransaction` | `getUserTransaction()` Get a usertx for this server.
    `void` | `init(java.lang.String tmUniqueName, java.util.Properties properties)` Initializes the server object.
    `void` | `rollback(java.lang.String tid)` Rollback the transaction.
    `void` | `setRollbackOnly(java.lang.String tid)` Mark the transaction for rollback only.
    `void` | `shutdown()` Performs shutdown of the server.

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

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

- - ### Method Detail

    - #### getSingleton

          public static UserTransactionServerImp getSingleton()

    - #### getUserTransaction

          public javax.transaction.UserTransaction getUserTransaction()

      Get a usertx for this server.
      Returns:
        UserTransaction Null if the server is not exported; a usertx that can be used at remote clients otherwise.

    - #### getName

          public java.lang.String getName()

      Get the name on which this instance is listening in RMI.
      Returns:
        String The name.

    - #### init

          public void init(java.lang.String tmUniqueName,
                  java.util.Properties properties)
                    throws SysException

      Initializes the server object. Should be called as the first method, and only after the JTA transaction manager has been set up.
      Parameters:
        `properties` - The JNDI environment to use.
        `tmUniqueName` - The unique name that the TM is listening on.
      Throws:
        `SysException`

    - #### shutdown

          public void shutdown()
                        throws SysException

      Performs shutdown of the server. Should be called last.
      Throws:
        `SysException`

    - #### begin

          public java.lang.String begin(int timeout)
                                 throws java.rmi.RemoteException,
                                        javax.transaction.SystemException,
                                        javax.transaction.NotSupportedException

      Description copied from interface: `UserTransactionServer`
      Create a new transaction.
      Specified by:
        `begin` in interface `UserTransactionServer`
      Parameters:
        `timeout` - The timeout setting of the client UserTx.
      Returns:
        String The tid of the transaction.
      Throws:
        `java.rmi.RemoteException`
        `javax.transaction.SystemException`
        `javax.transaction.NotSupportedException`
      See Also:
        `UserTransactionServer`

    - #### commit

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

      Description copied from interface: `UserTransactionServer`
      Commit the transaction.
      Specified by:
        `commit` in interface `UserTransactionServer`
      Parameters:
        `tid` - The tid of the tx to commit.
      Throws:
        `java.rmi.RemoteException`
        `javax.transaction.RollbackException`
        `javax.transaction.HeuristicMixedException`
        `javax.transaction.HeuristicRollbackException`
        `java.lang.SecurityException`
        `java.lang.IllegalStateException`
        `javax.transaction.SystemException`
      See Also:
        `UserTransactionServer`

    - #### rollback

          public void rollback(java.lang.String tid)
                        throws java.rmi.RemoteException,
                               java.lang.IllegalStateException,
                               java.lang.SecurityException,
                               javax.transaction.SystemException

      Description copied from interface: `UserTransactionServer`
      Rollback the transaction.
      Specified by:
        `rollback` in interface `UserTransactionServer`
      Parameters:
        `tid` - The tid of the transaction to rollback.
      Throws:
        `java.rmi.RemoteException`
        `java.lang.IllegalStateException`
        `java.lang.SecurityException`
        `javax.transaction.SystemException`
      See Also:
        `UserTransactionServer`

    - #### setRollbackOnly

          public void setRollbackOnly(java.lang.String tid)
                               throws java.rmi.RemoteException,
                                      java.lang.IllegalStateException,
                                      javax.transaction.SystemException

      Description copied from interface: `UserTransactionServer`
      Mark the transaction for rollback only.
      Specified by:
        `setRollbackOnly` in interface `UserTransactionServer`
      Parameters:
        `tid` - The tid of the transaction to mark.
      Throws:
        `java.rmi.RemoteException`
        `java.lang.IllegalStateException`
        `javax.transaction.SystemException`
      See Also:
        `UserTransactionServer`

    - #### getStatus

          public int getStatus(java.lang.String tid)
                        throws java.rmi.RemoteException,
                               javax.transaction.SystemException

      Description copied from interface: `UserTransactionServer`
      Get the status of the transaction.
      Specified by:
        `getStatus` in interface `UserTransactionServer`
      Parameters:
        `tid` - The tid.
      Returns:
        int The status, as defined in JTA.
      Throws:
        `java.rmi.RemoteException`
        `javax.transaction.SystemException`
      See Also:
        `UserTransactionServer`

Copyright © 2018. All Rights Reserved.