|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tyrex.tm.RuntimeContext tyrex.tm.impl.ThreadContext
Implementation of RuntimeContext
.
Field Summary | |
protected TransactionImpl |
_tx
The transaction associated with this thread, if the thread is in a transaction, or null if the thread is not in a transaction. |
protected tyrex.tm.impl.ThreadContext.InternalXAResourceHolder |
_xaResourceHolder
The XA resources and callbacks that have been opened before or during the transaction and must be enlisted with the transaction when the transaction starts. |
Constructor Summary | |
ThreadContext(javax.naming.Context context,
javax.security.auth.Subject subject)
|
|
ThreadContext(javax.security.auth.Subject subject)
|
Method Summary | |
protected void |
add(javax.transaction.xa.XAResource xaResource,
XAResourceCallback callback)
Adds an XA resource to the association list. |
void |
cleanup()
Cleanup the runtime context and discard all resources associated with it. |
static void |
cleanup(java.lang.Thread thread)
Called to destroy all association with a thread. |
javax.naming.Context |
getEnvContext()
Returns the JNDI environment context associated with this runtime context. |
MemoryBinding |
getMemoryBinding()
|
javax.security.auth.Subject |
getSubject()
Returns the security subject associated with this runtime context. |
static ThreadContext |
getThreadContext()
|
static ThreadContext |
getThreadContext(java.lang.Thread thread)
|
javax.transaction.Transaction |
getTransaction()
Returns the transaction associated with this runtime context. |
protected XAResourceHolder[] |
getXAResourceHolders()
Returns all the XA resources, or null if no resources are enlisted. |
protected boolean |
remove(javax.transaction.xa.XAResource xaResource)
Removes an XA resource from the associated list. |
static void |
setThreadContext(ThreadContext context)
|
static ThreadContext |
unsetThreadContext()
|
Methods inherited from class tyrex.tm.RuntimeContext |
getRuntimeContext, newEnvContext, newRuntimeContext, newRuntimeContext, setRuntimeContext, unsetRuntimeContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TransactionImpl _tx
protected tyrex.tm.impl.ThreadContext.InternalXAResourceHolder _xaResourceHolder
Constructor Detail |
public ThreadContext(javax.security.auth.Subject subject)
public ThreadContext(javax.naming.Context context, javax.security.auth.Subject subject) throws javax.naming.NamingException
Method Detail |
public static ThreadContext getThreadContext()
public static ThreadContext getThreadContext(java.lang.Thread thread)
public static void setThreadContext(ThreadContext context)
public static ThreadContext unsetThreadContext()
public static void cleanup(java.lang.Thread thread)
RuntimeContext
public javax.naming.Context getEnvContext()
RuntimeContext
The returned context is read-write and can be populated with objects available from the JNDI environment context when this runtime context is associated with the current thread.
getEnvContext
in class RuntimeContext
public javax.transaction.Transaction getTransaction()
RuntimeContext
If the runtime context is associated with any open transaction,
the transaction will be returned. When the runtime context is
associated with the current thread, this method will return the
same transaction as TransactionManager#getTransaction
.
getTransaction
in class RuntimeContext
public javax.security.auth.Subject getSubject()
RuntimeContext
This security subject is used for authentication and authorization.
getSubject
in class RuntimeContext
public void cleanup()
RuntimeContext
This method is called when it has been determined that this runtime context will no longer be used.
cleanup
in class RuntimeContext
public MemoryBinding getMemoryBinding()
protected void add(javax.transaction.xa.XAResource xaResource, XAResourceCallback callback)
protected boolean remove(javax.transaction.xa.XAResource xaResource)
xaResource
- the XA resource
protected XAResourceHolder[] getXAResourceHolders()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |