Package com.arjuna.mw.wst11
Class UserBusinessActivity
java.lang.Object
com.arjuna.mw.wst11.UserBusinessActivity
This is the interface that allows BAs to be started and terminated.
The messaging layer converts the messages into calls on this.
Importantly, a UserBusinessActivity does not represent a specific
transaction, but rather is responsible for providing access to an implicit
per-thread transaction context; it is similar to the UserTransaction in
the JTA specification. Therefore, all of the UserTransaction methods
implicitly act on the current thread of control.
- Since:
- XTS 1.0.
- Version:
- $Id: UserBusinessActivity.java,v 1.4.6.1 2005/11/22 10:36:06 kconner Exp $
- Author:
- Mark Little (mark.little@arjuna.com)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
begin()
Start a new business activity with atomic outcome.abstract void
begin
(int timeout) Start a new BA with atomic outcome and the specified timeout as its lifetime.abstract void
cancel()
If the BA must undo its work then the cancel method is used.abstract void
close()
The BA is normally terminated by the close method.abstract void
complete()
If participants have registered for the BusinessAgreementWithComplete protocol then they will be expecting the application to inform them when all work intended for them has been sent (and responded to).static UserBusinessActivity
Get the user business activity.abstract UserBusinessActivity
get the user subordinate business activity this is a UserBusinessActivity whose begin method will create an interposed BA transactionstatic void
setUserBusinessActivity
(UserBusinessActivity userBusinessActivity) Set the user business activity.abstract String
-
Field Details
-
ATOMIC_OUTCOME
public static final int ATOMIC_OUTCOME- See Also:
-
MIXED_OUTCOME
public static final int MIXED_OUTCOME- See Also:
-
-
Constructor Details
-
UserBusinessActivity
public UserBusinessActivity()
-
-
Method Details
-
getUserBusinessActivity
Get the user business activity.- Returns:
- The user business activity.
-
setUserBusinessActivity
Set the user business activity.- Parameters:
userBusinessActivity
- The user business activity.
-
getUserSubordinateBusinessActivity
get the user subordinate business activity this is a UserBusinessActivity whose begin method will create an interposed BA transaction- Returns:
- The user business activity.
-
begin
Start a new business activity with atomic outcome. If one is already associated with this thread then the WrongStateException will be thrown. Upon success, this operation associates the newly created transaction with the current thread.- Throws:
WrongStateException
SystemException
-
begin
Start a new BA with atomic outcome and the specified timeout as its lifetime. If one is already associated with this thread then the WrongStateException will be thrown.- Throws:
WrongStateException
SystemException
-
close
public abstract void close() throws TransactionRolledBackException, UnknownTransactionException, SystemException, WrongStateExceptionThe BA is normally terminated by the close method. This signals to all registered participants that the BA has ended and no compensation is required. -
cancel
public abstract void cancel() throws UnknownTransactionException, SystemException, WrongStateExceptionIf the BA must undo its work then the cancel method is used. Any participants that can compensate are forced to do so. -
complete
public abstract void complete() throws UnknownTransactionException, SystemException, WrongStateExceptionIf participants have registered for the BusinessAgreementWithComplete protocol then they will be expecting the application to inform them when all work intended for them has been sent (and responded to). The complete method is used for this purpose. -
transactionIdentifier
-