com.atomikos.icatch.system
Class SubTxThread
java.lang.Object
java.lang.Thread
com.atomikos.icatch.system.SubTxThread
- All Implemented Interfaces:
- Runnable
public class SubTxThread
- extends Thread
A thread class for subtransaction threads. A SubTxThread is a thread whose
code is automatically executed in a subtransaction of the calling thread's
transaction. Creation, start and end of the subtransaction is done by the
system so the programmer does not have to worry about that. To create a new
instance, you need a Waiter and a SubTxCode instance.
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
SubTxThread
public SubTxThread(Waiter w,
SubTxCode code,
HeuristicMessage tag)
throws SysException
- Creates a new instance for a given waiter, with a given subtx code.
- Parameters:
w
- The waiter for synchronization. The creating thread should
wait for all subtx threads to finish.code
- The SubTxCode to execute.tag
- A heuristic message for this thread's execution. Useful in
case of heuristic problems.
- Throws:
SysException
- On failure; for instance, if the calling thread has no
transaction associated to it, or no transaction manager is
running.
getException
public Exception getException()
run
public void run()
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Thread
Copyright © 2011. All Rights Reserved.