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

## weblogic.transaction
Class TxHelper

    java.lang.Object
      weblogic.transaction.ClientTxHelper
          weblogic.transaction.TxHelper

    public class TxHelper

extends ClientTxHelper

This class is a convenience wrapper for gaining access to objects and resources related to the transaction manager, on both client and server processes, via static methods. Some of these methods are deprecated and TransactionHelper should be used instead.

Constructor Summary
`TxHelper()`

Method Summary
`static Xid` | `createXid(byte[] aGlobalTransactionId, byte[] aBranchQualifier)` Create an Xid object, assuming global transaction identifier is in internal format of weblogic's transaction manager.
`static Xid` | `createXid(int aFormatId, byte[] aGlobalTransactionId, byte[] aBranchQualifier)` Create an Xid object, given its public attributes.
`static InterposedTransactionManager` | `getClientInterposedTransactionManager(Context initialContext, String serverName)` Client-side gateway implementors should use this method to obtain the `InterposedTransactionManager` interface of the Client transaction manager that corresponds to a particular server's transaction manager to import foreign transactions into WLS.
`static ClientTransactionManager` | `getClientTransactionManager()` Deprecated.
`static InterposedTransactionManager` | `getServerInterposedTransactionManager()` Server-side gateway implementors should use this method to obtain the `InterposedTransactionManager` interface of the local singleton Server transaction manager to import foreign transactions into WLS.
`static Transaction` | `getTransaction()` Deprecated.
`static UserTransaction` | `getUserTransaction()` Deprecated.
`static String` | `status2String(int status)` Translates `javax.transaction.Status` constants to English strings.

Methods inherited from class weblogic.transaction.ClientTxHelper
`getTransactionManager`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TxHelper

    public TxHelper()

Method Detail

### getTransaction

    public static Transaction getTransaction()

  Deprecated.

  See Also:
    `TransactionHelper.getTransaction()`

### getUserTransaction

    public static UserTransaction getUserTransaction()

  Deprecated.

  See Also:
    `TransactionHelper.getUserTransaction()`

### getClientTransactionManager

    public static ClientTransactionManager getClientTransactionManager()

  Deprecated.

  See Also:
    `TransactionHelper.getTransactionManager()`

### getServerInterposedTransactionManager

    public static InterposedTransactionManager getServerInterposedTransactionManager()

  Server-side gateway implementors should use this method to obtain the `InterposedTransactionManager` interface of the local singleton Server transaction manager to import foreign transactions into WLS. This local singleton Server transaction manager will also internally coordinate all foreign transactions imported through it.

  Returns:
    The InterposedTransactionManager interface of the singleton Server transaction manager
  See Also:
    `InterposedTransactionManager`

### getClientInterposedTransactionManager

    public static InterposedTransactionManager getClientInterposedTransactionManager(Context initialContext,
                                                                                     String serverName)

  Client-side gateway implementors should use this method to obtain the `InterposedTransactionManager` interface of the Client transaction manager that corresponds to a particular server's transaction manager to import foreign transactions into WLS. Foreign transactions imported into WLS through this Client transaction manager will be coordinated by the specified server internally.

  If the initial context is obtained from a non-clustered server, then the server name specified should refer to the same server. If the initial context is obtained from a cluster, then the server name specified should refer to a server within the cluster.

  Note that this method returns `null` on any errors. If clients are interested in getting the exceptions thrown when obtaining the `InterposedTransactionManager`, they could perform JNDI lookup for the following path from the initial context directly: weblogic.transaction.coordinators.

  Note that even though it is possible to cast the `TransactionManager` instance obtained from `getTransactionManager` to a `InterposedTransactionManager` instance, but doing so is strongly discouraged. This is because the Client transaction manager singleton instance returned by `getTransactionManager` may not be associated with any server, and cannot import transactions.

  Parameters:
    `serverName` - The name of the server
  Returns:
    The InterposedTransactionManager interface of the Client transaction manager that corresponds to the specified server's transaction manager. Returns null on any error.
  See Also:
    `InterposedTransactionManager`

### status2String

    public static String status2String(int status)

  Translates `javax.transaction.Status` constants to English strings.

### createXid

    public static Xid createXid(int aFormatId,
                                byte[] aGlobalTransactionId,
                                byte[] aBranchQualifier)

  Create an Xid object, given its public attributes.

  Parameters:
    `aFormatId` - Format identifier
    `aGlobalTransactionId` - Global transation identifier
    `aBranchQualifier` - Branch qualifier
  Returns:
    An Xid object or null

### createXid

    public static Xid createXid(byte[] aGlobalTransactionId,
                                byte[] aBranchQualifier)

  Create an Xid object, assuming global transaction identifier is in internal format of weblogic's transaction manager.

  Parameters:
    `aGlobalTransactionId` - Global transation identifier
    `aBranchQualifier` - Branch qualifier (optional)
  Returns:
    An Xid object or null

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://edocs.bea.com/wls/docs103 Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD