Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.3)

Part Number E13941-03

weblogic.transaction
Class TransactionHelper

java.lang.Object
  extended by weblogic.transaction.TransactionHelper

public abstract class TransactionHelper
extends Object

Helper for managing transactions required by higher-level functionality.

See Also:
This class is a convenience wrapper for gaining access to objects and resources related to the transaction manager, on both client and server processes.

Constructor Summary
TransactionHelper()
           
 
Method Summary
 javax.transaction.Transaction getTransaction()
          Gets the transaction associated with this thread.
static TransactionHelper getTransactionHelper()
          Get the TransactionHelper singleton.
abstract  ClientTransactionManager getTransactionManager()
          Return an implementation of TransactionManager suitable for use in the current client.
abstract  UserTransaction getUserTransaction()
          Return an implementation of UserTransaction suitable for use in the current client.
static TransactionHelper popTransactionHelper()
          Pop the TransactionHelper singleton.
static void pushTransactionHelper(TransactionHelper helper)
          Push the TransactionHelper singleton.
static void setTransactionHelper(TransactionHelper helper)
          Set the TransactionHelper singleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionHelper

public TransactionHelper()
Method Detail

getTransactionHelper

public static TransactionHelper getTransactionHelper()
Get the TransactionHelper singleton.

Returns:
A suitable TransactionHelper implementation for client or server.

setTransactionHelper

public static void setTransactionHelper(TransactionHelper helper)
Set the TransactionHelper singleton. This should be set at startup and not synchronized.

Parameters:
helper - - a suitable TransactionHelper implementation for client or server.

pushTransactionHelper

public static void pushTransactionHelper(TransactionHelper helper)
Push the TransactionHelper singleton. This does nothing in a server since there only can ever be one TM.

Parameters:
helper - - a suitable TransactionHelper implementation for client or server.

popTransactionHelper

public static TransactionHelper popTransactionHelper()
                                              throws EmptyStackException
Pop the TransactionHelper singleton. This does nothing in a server since there only can ever be one TM.

Throws:
EmptyStackException

getUserTransaction

public abstract UserTransaction getUserTransaction()
Return an implementation of UserTransaction suitable for use in the current client.

See Also:
UserTransaction

getTransactionManager

public abstract ClientTransactionManager getTransactionManager()
Return an implementation of TransactionManager suitable for use in the current client.

See Also:
TransactionManager

getTransaction

public javax.transaction.Transaction getTransaction()
Gets the transaction associated with this thread. This simply calls TransactionManager.getTransaction().

Returns:
null (if there is no associated transaction or if an exception was raised)
See Also:
TransactionManager

Copyright 1996, 2010, 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.

Oracle Fusion Middleware
Oracle WebLogic Server 10.3.3 API Reference
11g Release 1 (10.3.3)

Part Number E13941-03