|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.tm.TransactionLocal
A TransactionLocal is similar to ThreadLocal except it is keyed on the Transactions. A transaction local variable is cleared after the transaction completes.
Field Summary | |
protected TransactionLocalDelegate (src) |
delegate
The delegate |
protected TransactionManager (src) |
transactionManager
The transaction manager is maintained by the system and manges the assocation of transaction to threads. |
Constructor Summary | |
TransactionLocal()
Creates a thread local variable. |
|
TransactionLocal(TransactionManager (src) tm)
Creates a thread local variable. |
Method Summary | |
protected boolean |
containsValue(Transaction (src) tx)
does Transaction contain object? |
java.lang.Object |
get()
Returns the value of this TransactionLocal variable associated with the thread context transaction. |
java.lang.Object |
get(Transaction (src) transaction)
Returns the value of this TransactionLocal variable associated with the specified transaction. |
Transaction (src) |
getTransaction()
|
protected java.lang.Object |
getValue(Transaction (src) tx)
get the transaction local value. |
protected void |
initDelegate()
Initialise the delegate |
protected java.lang.Object |
initialValue()
Returns the initial value for this thransaction local. |
void |
set(java.lang.Object value)
Sets the value of this TransactionLocal variable associtated with the thread context transaction. |
void |
set(Transaction (src) transaction,
java.lang.Object value)
Sets the value of this TransactionLocal variable associtated with the specified transaction. |
protected void |
storeValue(Transaction (src) tx,
java.lang.Object value)
put the value in the TransactionImpl map |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final TransactionManager (src) transactionManager
protected TransactionLocalDelegate (src) delegate
Constructor Detail |
public TransactionLocal()
java.lang.IllegalStateException
- if there is no system transaction managerpublic TransactionLocal(TransactionManager (src) tm)
tm
- the transaction managerMethod Detail |
protected java.lang.Object initialValue()
protected java.lang.Object getValue(Transaction (src) tx)
protected void storeValue(Transaction (src) tx, java.lang.Object value)
protected boolean containsValue(Transaction (src) tx)
public java.lang.Object get()
public java.lang.Object get(Transaction (src) transaction)
transaction
- the transaction for which the variable it to
be retrieved
java.lang.IllegalStateException
- if an error occures while registering
a synchronization callback with the transactionpublic void set(java.lang.Object value)
value
- the value to be associated with the thread context
transactions's TransactionLocalpublic void set(Transaction (src) transaction, java.lang.Object value)
transaction
- the transaction for which the value will be setvalue
- the value to be associated with the thread context
transactions's TransactionLocalpublic Transaction (src) getTransaction()
protected void initDelegate()
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |