Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.icatch.jta
Class UserTransactionServerImp

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

All Implemented Interfaces:
  UserTransactionServer, Remote

    public class UserTransactionServerImp

extends 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
`String` | `begin(int timeout)` Create a new transaction.
`void` | `commit(String tid)` Commit the transaction.
`String` | `getName()` Get the name on which this instance is listening in RMI.
`static UserTransactionServerImp` | `getSingleton()`
`int` | `getStatus(String tid)` Get the status of the transaction.
`UserTransaction` | `getUserTransaction()` Get a usertx for this server.
`void` | `init(String tmUniqueName, Properties properties)` Initializes the server object.
`void` | `rollback(String tid)` Rollback the transaction.
`void` | `setRollbackOnly(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 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 String getName()

  Get the name on which this instance is listening in RMI.

  Returns:
    String The name.

### init

    public void init(String tmUniqueName,
                     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 String begin(int timeout)
                 throws RemoteException,
                        SystemException,
                        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:
    `RemoteException`
    `SystemException`
    `NotSupportedException`
  See Also:
    `UserTransactionServer`

### commit

    public void commit(String tid)
                throws RemoteException,
                       RollbackException,
                       HeuristicMixedException,
                       HeuristicRollbackException,
                       SecurityException,
                       IllegalStateException,
                       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:
    `RemoteException`
    `RollbackException`
    `HeuristicMixedException`
    `HeuristicRollbackException`
    `SecurityException`
    `IllegalStateException`
    `SystemException`
  See Also:
    `UserTransactionServer`

### rollback

    public void rollback(String tid)
                  throws RemoteException,
                         IllegalStateException,
                         SecurityException,
                         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:
    `RemoteException`
    `IllegalStateException`
    `SecurityException`
    `SystemException`
  See Also:
    `UserTransactionServer`

### setRollbackOnly

    public void setRollbackOnly(String tid)
                         throws RemoteException,
                                IllegalStateException,
                                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:
    `RemoteException`
    `IllegalStateException`
    `SystemException`
  See Also:
    `UserTransactionServer`

### getStatus

    public int getStatus(String tid)
                  throws RemoteException,
                         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:
    `RemoteException`
    `SystemException`
  See Also:
    `UserTransactionServer`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.