|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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 |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private static org.apache.commons.logging.Log |
log
Logger |
private javax.transaction.Transaction |
transaction
|
private javax.transaction.TransactionManager |
transctionManager
|
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 javax.transaction.TransactionManager |
createTransactionManager()
Factory method to create a TransactionManager via some mechanism. |
protected void |
delist(javax.transaction.Transaction transaction,
int flag)
Delists any resources from the current transaction. |
protected void |
enlist(javax.transaction.Transaction transaction)
Enlists any resources with the current transaction. |
javax.transaction.TransactionManager |
getTransactionManager()
|
protected XACapable |
getXACapable(Messenger messenger)
|
protected void |
rollbackTransaction()
Strategy method to represent the code required to rollback a transaction. |
void |
setTransactionManager(javax.transaction.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 |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private javax.transaction.TransactionManager transctionManager
private javax.transaction.Transaction transaction
Constructor Detail |
---|
public XAConsumerThread()
Method Detail |
---|
public javax.transaction.TransactionManager getTransactionManager() throws javax.transaction.SystemException
javax.transaction.SystemException
public void setTransactionManager(javax.transaction.TransactionManager transctionManager)
transctionManager
- the transaction manager to be usedprotected javax.transaction.TransactionManager createTransactionManager() throws javax.transaction.SystemException
javax.transaction.SystemException
protected void enlist(javax.transaction.Transaction transaction) throws java.lang.Exception
transaction
- the transaction to enlist resources with
java.lang.Exception
- if the enlistment fails for whatever reasonprotected void delist(javax.transaction.Transaction transaction, int flag) throws java.lang.Exception
transaction
- flag
- is the flag used by JTA when delisting resources.
It is either XAResource.TMSUCCESS, XAResource.TMSUSPEND, or XAResource.TMFAIL
java.lang.Exception
protected void startTransaction() throws java.lang.Exception
startTransaction
in class ConsumerThread
java.lang.Exception
protected void commitTransaction() throws java.lang.Exception
commitTransaction
in class ConsumerThread
java.lang.Exception
protected void rollbackTransaction() throws java.lang.Exception
java.lang.Exception
protected void cancelTransaction() throws java.lang.Exception
cancelTransaction
in class ConsumerThread
java.lang.Exception
protected XACapable getXACapable(Messenger messenger)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |