| 
||||||||||
| PREV CLASS NEXT CLASS | 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 | 
delegate
The delegate  | 
protected  TransactionManager | 
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 tm)
Creates a thread local variable.  | 
|
| Method Summary | |
protected  boolean | 
containsValue(Transaction tx)
does Transaction contain object?  | 
 Object | 
get()
Returns the value of this TransactionLocal variable associated with the thread context transaction.  | 
 Object | 
get(Transaction transaction)
Returns the value of this TransactionLocal variable associated with the specified transaction.  | 
 Transaction | 
getTransaction()
 | 
protected  Object | 
getValue(Transaction tx)
get the transaction local value.  | 
protected  void | 
initDelegate()
Initialise the delegate  | 
protected  Object | 
initialValue()
Returns the initial value for this thransaction local.  | 
 void | 
set(Object value)
Sets the value of this TransactionLocal variable associtated with the thread context transaction.  | 
 void | 
set(Transaction transaction,
    Object value)
Sets the value of this TransactionLocal variable associtated with the specified transaction.  | 
protected  void | 
storeValue(Transaction tx,
           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 transactionManager
protected TransactionLocalDelegate delegate
| Constructor Detail | 
public TransactionLocal()
IllegalStateException - if there is no system transaction managerpublic TransactionLocal(TransactionManager tm)
tm - the transaction manager| Method Detail | 
protected Object initialValue()
protected Object getValue(Transaction tx)
protected void storeValue(Transaction tx, Object value)
protected boolean containsValue(Transaction tx)
public Object get()
public Object get(Transaction transaction)
transaction - the transaction for which the variable it to 
 be retrieved
IllegalStateException - if an error occures while registering
 a synchronization callback with the transactionpublic void set(Object value)
value - the value to be associated with the thread context 
 transactions's TransactionLocalpublic void set(Transaction transaction, 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 getTransaction()
protected void initDelegate()
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||