|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread org.apache.commons.messagelet.ConsumerThread org.apache.commons.messagelet.XAConsumerThread
public class XAConsumerThread
XAConsumerThread
is a thread which will perform XA processing
of messages
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 | |
---|---|
XAConsumerThread()
|
Method Summary | |
---|---|
protected void |
cancelTransaction()
Strategy method to represent the code required to cancel a transaction. |
protected void |
commitTransaction()
Strategy method to represent the code required to commit a transaction. |
protected TransactionManager |
createTransactionManager()
Factory method to create a TransactionManager via some mechanism. |
protected void |
delist(Transaction transaction,
int flag)
Delists any resources from the current transaction. |
protected void |
enlist(Transaction transaction)
Enlists any resources with the current transaction. |
TransactionManager |
getTransactionManager()
|
protected XACapable |
getXACapable(Messenger messenger)
|
protected void |
rollbackTransaction()
Strategy method to represent the code required to rollback a transaction. |
void |
setTransactionManager(TransactionManager transctionManager)
Sets the transaction manager to be used |
protected void |
startTransaction()
Strategy method to represent the code required to start a transaction. |
Methods inherited from class org.apache.commons.messagelet.ConsumerThread |
---|
createConsumer, getConsumer, getDestination, getListener, getMessenger, getSelector, isShouldStop, processMessage, rollbackTransaction, run, setDestination, setListener, setMessenger, setSelector, setShouldStop, startConsumer, stopConsumer |
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 |
---|
public XAConsumerThread()
Method Detail |
---|
public TransactionManager getTransactionManager() throws SystemException
SystemException
public void setTransactionManager(TransactionManager transctionManager)
transctionManager
- the transaction manager to be usedprotected TransactionManager createTransactionManager() throws SystemException
SystemException
protected void enlist(Transaction transaction) throws Exception
transaction
- the transaction to enlist resources with
Exception
- if the enlistment fails for whatever reasonprotected void delist(Transaction transaction, int flag) throws Exception
transaction
- flag
- is the flag used by JTA when delisting resources.
It is either XAResource.TMSUCCESS, XAResource.TMSUSPEND, or XAResource.TMFAIL
Exception
protected void startTransaction() throws Exception
startTransaction
in class ConsumerThread
Exception
protected void commitTransaction() throws Exception
commitTransaction
in class ConsumerThread
Exception
protected void rollbackTransaction() throws Exception
Exception
protected void cancelTransaction() throws Exception
cancelTransaction
in class ConsumerThread
Exception
protected XACapable getXACapable(Messenger messenger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |