|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.transaction.TransactionHelper
public abstract class TransactionHelper
Helper for managing transactions required by higher-level functionality.
This helper allows the local TM to be replaced at will,
unfortunately this is quite difficult to accomodate with the use of
InitialContext. InitialContext is totally bogus if you try and use
multiple protocols. It essentially sets global properties (such as
the current user for the thread), even though it appears to be
scoped. This means, for instance, that if you create a new
InitialContext, get a remote object then created a different
InitialContext you will get the properties of the second context if
you invoke on the object. The same applies to multiple protocols,
for instance using t3 followed by iiop. Thus it is necessary for
the TransactionHelper to be `pushed' - as is the current Subject -
to give the illusion of multiple protocols working in harmony.
The alternatives are:
1. Have a single TM for all protocols. This doesn't work very well
in the thin-client where we need to do something completely
different.
2. Have mutually exclusive `native' and `foreign' TMs, in other
words use the standard JTA TM in both the WLS-IIOP client and the
t3 client and something different in the JDK client. This would
preclude using t3 and the JDK client together, which currently
works.
IMPORTANT: these interfaces should not reference any classes
outside of the JDK.
Constructor Summary | |
---|---|
TransactionHelper()
|
Method Summary | |
---|---|
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 |
---|
public TransactionHelper()
Method Detail |
---|
public static TransactionHelper getTransactionHelper()
public static void setTransactionHelper(TransactionHelper helper)
helper
- - a suitable TransactionHelper implementation for
client or server.public static void pushTransactionHelper(TransactionHelper helper)
helper
- - a suitable TransactionHelper implementation for
client or server.public static TransactionHelper popTransactionHelper() throws EmptyStackException
EmptyStackException
public abstract UserTransaction getUserTransaction()
UserTransaction
public abstract ClientTransactionManager getTransactionManager()
TransactionManager
public Transaction getTransaction()
TransactionManager.getTransaction()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs92 Copyright 2006 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |