@Deprecated
public class TransactionLocal
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected TransactionLocalDelegate |
delegate
Deprecated.
The delegate
|
private static java.lang.Object |
NULL_VALUE
Deprecated.
To simplify null values handling in the preloaded data pool we use
this value instead of 'null'
|
protected javax.transaction.TransactionManager |
transactionManager
Deprecated.
The transaction manager is maintained by the system and
manges the assocation of transaction to threads.
|
| Constructor and Description |
|---|
TransactionLocal()
Deprecated.
Creates a thread local variable.
|
TransactionLocal(javax.transaction.TransactionManager tm)
Deprecated.
Creates a transaction local variable.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
containsValue(javax.transaction.Transaction tx)
Deprecated.
does Transaction contain object?
|
java.lang.Object |
get()
Deprecated.
Returns the value of this TransactionLocal variable associated with the
thread context transaction.
|
java.lang.Object |
get(javax.transaction.Transaction transaction)
Deprecated.
Returns the value of this TransactionLocal variable associated with the
specified transaction.
|
javax.transaction.Transaction |
getTransaction()
Deprecated.
|
protected java.lang.Object |
getValue(javax.transaction.Transaction tx)
Deprecated.
get the transaction local value.
|
protected void |
initDelegate()
Deprecated.
Initialise the delegate
|
protected java.lang.Object |
initialValue()
Deprecated.
Returns the initial value for this thransaction local.
|
void |
lock()
Deprecated.
Lock the TransactionLocal using the current transaction
|
void |
lock(javax.transaction.Transaction transaction)
Deprecated.
Lock the TransactionLocal using the provided transaction
|
void |
set(java.lang.Object value)
Deprecated.
Sets the value of this TransactionLocal variable associtated with the
thread context transaction.
|
void |
set(javax.transaction.Transaction transaction,
java.lang.Object value)
Deprecated.
Sets the value of this TransactionLocal variable associtated with the
specified transaction.
|
protected void |
storeValue(javax.transaction.Transaction tx,
java.lang.Object value)
Deprecated.
put the value in the TransactionImpl map
|
void |
unlock()
Deprecated.
Unlock the TransactionLocal using the current transaction
|
void |
unlock(javax.transaction.Transaction transaction)
Deprecated.
Unlock the ThreadLocal using the provided transaction
|
private static final java.lang.Object NULL_VALUE
protected final javax.transaction.TransactionManager transactionManager
protected TransactionLocalDelegate delegate
public TransactionLocal()
java.lang.IllegalStateException - if there is no system transaction managerpublic TransactionLocal(javax.transaction.TransactionManager tm)
tm - the transaction managerpublic void lock()
throws java.lang.InterruptedException
WARN: The current implemention just "locks the transactions"
java.lang.IllegalStateException - if the transaction is not activejava.lang.InterruptedException - if the thread is interruptedpublic void lock(javax.transaction.Transaction transaction)
throws java.lang.InterruptedException
WARN: The current implemention just "locks the transactions"
transaction - the transactionjava.lang.IllegalStateException - if the transaction is not activejava.lang.InterruptedException - if the thread is interruptedpublic void unlock()
public void unlock(javax.transaction.Transaction transaction)
transaction - the transactionprotected java.lang.Object initialValue()
protected java.lang.Object getValue(javax.transaction.Transaction tx)
tx - the transactionprotected void storeValue(javax.transaction.Transaction tx,
java.lang.Object value)
tx - the transactionvalue - the valueprotected boolean containsValue(javax.transaction.Transaction tx)
tx - the transactionpublic java.lang.Object get()
public java.lang.Object get(javax.transaction.Transaction transaction)
transaction - the transaction for which the variable it to
be retrievedjava.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(javax.transaction.Transaction 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 javax.transaction.Transaction getTransaction()
protected void initDelegate()