com.atomikos.icatch.system
Class SubTxThread

java.lang.Object
  extended by java.lang.Thread
      extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SubTxThread(Waiter w, SubTxCode code, HeuristicMessage tag)
          Creates a new instance for a given waiter, with a given subtx code.
 
Method Summary
 Exception getException()
           
 void run()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

getException

public Exception getException()

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2011. All Rights Reserved.