|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.txbridge.ba.SingleTransactionManager
public class SingleTransactionManager
The Single Transaction Manager component is responsible for maintaining information about a single Business Activity. It knows about the exact order of tasks that have been executed within the Business Activity, the participants that have been instantiated for this specific Business Activity and about participant managers responsible for those participants.
Field Summary | |
---|---|
private static com.arjuna.mw.wst.BusinessActivityManager |
businessActivityManager
|
private static org.apache.log4j.Logger |
log
|
private java.util.concurrent.ConcurrentMap<Participant,com.arjuna.wst.BAParticipantManager> |
participantManagerMapping
|
private static ServiceInformationManager |
serviceInformationManager
|
private java.util.concurrent.ConcurrentMap<java.lang.String,Participant> |
serviceParticipantMapping
|
private java.util.List<java.lang.String> |
singleServiceList
|
private java.util.concurrent.ConcurrentMap<java.lang.String,com.arjuna.wst.BAParticipantManager> |
taskBAManagerMapping
|
private java.util.List<java.lang.String> |
taskList
|
private java.util.List<java.lang.String> |
taskListFirst
|
private java.util.List<java.lang.String> |
taskListLast
|
private java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> |
taskServiceMapping
|
private boolean |
transactionCompleted
|
private java.lang.String |
txId
|
Constructor Summary | |
---|---|
SingleTransactionManager(java.lang.String txId)
|
Method Summary | |
---|---|
void |
cleanInvocation(TaskDescription taskDesc)
This method cleans invocation - if there was an error with invoking the required service then transaction-related information is removed. |
void |
compensate()
This method executes datamgmt for all tasks that are associated with this transaction. |
private void |
compensateList(java.util.Stack<java.lang.String> taskList)
This method executes a datamgmt for a given list of tasks. |
void |
complete()
This method is executed by the participant. |
void |
completeInvocation(TaskDescription taskDesc,
java.lang.Object[] arguments,
java.lang.Object returnObject)
This method handles transaction management for a certain invocation of a method when this invocation has already completed. |
private void |
completeList(java.util.List<CoordinatorCompletionParticipant> participantList,
java.util.Map<Participant,com.arjuna.wst.BAParticipantManager> managerList)
This method loops through a list of participants that should complete its work. |
void |
completeTask(java.lang.String taskId,
MethodType serviceType)
This method completes the work done by the given participant within a certain transaction. |
Participant |
processInvocation(java.lang.String taskId,
java.lang.String serviceId)
This method processes a single invocation within a scope of a transaction this single transaction manager is responsible for. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.log4j.Logger log
private static com.arjuna.mw.wst.BusinessActivityManager businessActivityManager
private static ServiceInformationManager serviceInformationManager
private java.lang.String txId
private boolean transactionCompleted
private java.util.List<java.lang.String> taskList
private java.util.List<java.lang.String> taskListFirst
private java.util.List<java.lang.String> taskListLast
private java.util.List<java.lang.String> singleServiceList
private java.util.concurrent.ConcurrentMap<java.lang.String,java.lang.String> taskServiceMapping
private java.util.concurrent.ConcurrentMap<java.lang.String,Participant> serviceParticipantMapping
private java.util.concurrent.ConcurrentMap<java.lang.String,com.arjuna.wst.BAParticipantManager> taskBAManagerMapping
private java.util.concurrent.ConcurrentMap<Participant,com.arjuna.wst.BAParticipantManager> participantManagerMapping
Constructor Detail |
---|
public SingleTransactionManager(java.lang.String txId)
Method Detail |
---|
public Participant processInvocation(java.lang.String taskId, java.lang.String serviceId) throws TransactionProcessingException
taskId
- is the task identifier.serviceId
- is the service identifier.
TransactionProcessingException
- if an error occurspublic void completeInvocation(TaskDescription taskDesc, java.lang.Object[] arguments, java.lang.Object returnObject) throws com.arjuna.wst.SystemException, com.arjuna.wst.UnknownTransactionException, com.arjuna.wst.WrongStateException, TransactionProcessingException
taskDesc
- is the task description.arguments
- is the list of original arguments.returnObject
- is the return object.
com.arjuna.wst.SystemException
- if there was an error.
com.arjuna.wst.UnknownTransactionException
- if there was an error.
com.arjuna.wst.WrongStateException
- if there was an error.
TransactionProcessingException
- if there was an error.public void completeTask(java.lang.String taskId, MethodType serviceType) throws TransactionProcessingException, com.arjuna.wst.SystemException, com.arjuna.wst.UnknownTransactionException, com.arjuna.wst.WrongStateException
taskId
- is the participant which wants to completeTask its work.serviceType
- is the type of the service.
TransactionProcessingException
- if processing was not successful.
com.arjuna.wst.SystemException
- if processing was not successful.
com.arjuna.wst.UnknownTransactionException
- if processing was not successful.
com.arjuna.wst.WrongStateException
- if processing was not successful.public void cleanInvocation(TaskDescription taskDesc) throws TransactionProcessingException
taskDesc
- is the description of a certain task.
TransactionProcessingException
- an internal error.public void complete()
private void completeList(java.util.List<CoordinatorCompletionParticipant> participantList, java.util.Map<Participant,com.arjuna.wst.BAParticipantManager> managerList)
participantList
- is the list of participants that should complete their work.managerList
- is the list of BAParticipantManagers associated with participantspublic void compensate()
private void compensateList(java.util.Stack<java.lang.String> taskList)
taskList
- is the list of tasks which should be compensated.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |