Package com.arjuna.mw.wst11
Class BusinessActivityManager
java.lang.Object
com.arjuna.mw.wst11.BusinessActivityManager
This is the interface that the core exposes in order to allow different
types of participants to be enrolled. The messaging layer continues to
work in terms of the registrar, but internally we map to one of these
methods.
As with UserTransaction a TransactionManager does not represent a specific
transaction, but rather is responsible for providing access to an implicit
per-thread transaction context.
- Since:
- XTS 1.0.
- Version:
- $Id: BusinessActivityManager.java,v 1.4.8.1 2005/11/22 10:36:05 kconner Exp $
- Author:
- Mark Little (mark.little@arjuna.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract TxContext
The currentTransaction method returns the TxContext for the current transaction, or null if there is none.abstract BAParticipantManager
enlistForBusinessAgreementWithCoordinatorCompletion
(BusinessAgreementWithCoordinatorCompletionParticipant bawcp, String id) Enlist a participant for the BusinessAgreementWithCoordinatorCompletion protocol.abstract BAParticipantManager
enlistForBusinessAgreementWithParticipantCompletion
(BusinessAgreementWithParticipantCompletionParticipant bap, String id) Enlist a participant for the BusinessAgreement protocol.static BusinessActivityManager
Get the business activity manager.abstract void
The resume method can be used to (re-)associate a thread with a transaction(s) via its TxContext.static void
Set the business activity manager.abstract TxContext
suspend()
A thread of control may require periods of non-transactionality so that it may perform work that is not associated with a specific transaction.
-
Constructor Details
-
BusinessActivityManager
public BusinessActivityManager()
-
-
Method Details
-
getBusinessActivityManager
Get the business activity manager.- Returns:
- The business activity manager.
-
setBusinessActivityManager
Set the business activity manager.- Parameters:
manager
- The business activity manager.
-
enlistForBusinessAgreementWithParticipantCompletion
public abstract BAParticipantManager enlistForBusinessAgreementWithParticipantCompletion(BusinessAgreementWithParticipantCompletionParticipant bap, String id) throws WrongStateException, UnknownTransactionException, SystemException Enlist a participant for the BusinessAgreement protocol.- Returns:
- the BAParticipantManager for this transaction.
- Throws:
WrongStateException
UnknownTransactionException
SystemException
-
enlistForBusinessAgreementWithCoordinatorCompletion
public abstract BAParticipantManager enlistForBusinessAgreementWithCoordinatorCompletion(BusinessAgreementWithCoordinatorCompletionParticipant bawcp, String id) throws WrongStateException, UnknownTransactionException, SystemException Enlist a participant for the BusinessAgreementWithCoordinatorCompletion protocol.- Returns:
- the BAParticipantManager for this transaction.
- Throws:
WrongStateException
UnknownTransactionException
SystemException
-
resume
public abstract void resume(TxContext txContext) throws UnknownTransactionException, SystemException The resume method can be used to (re-)associate a thread with a transaction(s) via its TxContext. Prior to association, the thread is disassociated with any transaction(s) with which it may be currently associated. If the TxContext is null, then the thread is associated with no transaction. The UnknownTransactionException exception is thrown if the transaction that the TxContext refers to is invalid in the scope of the invoking thread. -
suspend
A thread of control may require periods of non-transactionality so that it may perform work that is not associated with a specific transaction. In order to do this it is necessary to disassociate the thread from any transactions. The suspend method accomplishes this, returning a TxContext instance, which is a handle on the transaction. The thread is then no longer associated with any transaction.- Throws:
SystemException
-
currentTransaction
The currentTransaction method returns the TxContext for the current transaction, or null if there is none. Unlike suspend, this method does not disassociate the current thread from the transaction(s). This can be used to enable multiple threads to execute within the scope of the same transaction.- Throws:
SystemException
-