tyrex.tm.impl

Class ThreadContext

public class ThreadContext extends RuntimeContext

Implementation of RuntimeContext.

Version: $Revision: 1.10 $ $Date: 2001/10/05 22:15:34 $

Author: Assaf Arkin

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 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(Subject subject)
ThreadContext(Context context, Subject subject)
Method Summary
protected voidadd(XAResource xaResource, XAResourceCallback callback)
Adds an XA resource to the association list.
static voidcleanup(Thread thread)
voidcleanup()
ContextgetEnvContext()
MemoryBindinggetMemoryBinding()
SubjectgetSubject()
static ThreadContextgetThreadContext()
static ThreadContextgetThreadContext(Thread thread)
TransactiongetTransaction()
protected XAResourceHolder[]getXAResourceHolders()
Returns all the XA resources, or null if no resources are enlisted.
protected booleanremove(XAResource xaResource)
Removes an XA resource from the associated list.
static voidsetThreadContext(ThreadContext context)
static ThreadContextunsetThreadContext()

Field Detail

_tx

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.

_xaResourceHolder

protected 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. Allows null entries, but no duplicates. May be null.

Constructor Detail

ThreadContext

public ThreadContext(Subject subject)

ThreadContext

public ThreadContext(Context context, Subject subject)

Method Detail

add

protected void add(XAResource xaResource, XAResourceCallback callback)
Adds an XA resource to the association list.

cleanup

public static void cleanup(Thread thread)

cleanup

public void cleanup()

getEnvContext

public Context getEnvContext()

getMemoryBinding

public MemoryBinding getMemoryBinding()

getSubject

public Subject getSubject()

getThreadContext

public static ThreadContext getThreadContext()

getThreadContext

public static ThreadContext getThreadContext(Thread thread)

getTransaction

public Transaction getTransaction()

getXAResourceHolders

protected XAResourceHolder[] getXAResourceHolders()
Returns all the XA resources, or null if no resources are enlisted.

Returns: All XA resources, or null

remove

protected boolean remove(XAResource xaResource)
Removes an XA resource from the associated list.

Parameters: xaResource the XA resource

Returns: True if removed

setThreadContext

public static void setThreadContext(ThreadContext context)

unsetThreadContext

public static ThreadContext unsetThreadContext()
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.