Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.arjuna.mw.wst
Class UserBusinessActivity

    java.lang.Object
      com.arjuna.mw.wst.UserBusinessActivity

public abstract class UserBusinessActivity
extends java.lang.Object

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
`static int` | `ATOMIC_OUTCOME`
`static int` | `MIXED_OUTCOME`

Constructor Summary
`UserBusinessActivity()`

Method Summary
`abstract 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` | `getUserBusinessActivity()` Get the user business activity.
`static void` | `setUserBusinessActivity(UserBusinessActivity userBusinessActivity)` Set the user business activity.
`abstract java.lang.String` | `transactionIdentifier()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ATOMIC_OUTCOME

    public static final int ATOMIC_OUTCOME

See Also:
  Constant Field Values

### MIXED_OUTCOME

    public static final int MIXED_OUTCOME

See Also:
  Constant Field Values

Constructor Detail

### UserBusinessActivity

    public UserBusinessActivity()

Method Detail

### getUserBusinessActivity

    public static UserBusinessActivity getUserBusinessActivity()

  Get the user business activity.

  Returns:
    The user business activity.

### setUserBusinessActivity

    public static void setUserBusinessActivity(UserBusinessActivity userBusinessActivity)

  Set the user business activity.

  Parameters:
    `userBusinessActivity` - The user business activity.

### begin

    public abstract void begin()
                        throws WrongStateException,
                               SystemException

  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

    public abstract void begin(int timeout)
                        throws WrongStateException,
                               SystemException

  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

  The BA is normally terminated by the close method. This signals to all registered participants that the BA has ended and no compensation is required.

  Throws:
    `TransactionRolledBackException`
    `UnknownTransactionException`
    `SystemException`

### cancel

    public abstract void cancel()
                         throws UnknownTransactionException,
                                SystemException

  If the BA must undo its work then the cancel method is used. Any participants that can compensate are forced to do so.

  Throws:
    `UnknownTransactionException`
    `SystemException`

### complete

    public abstract void complete()
                           throws UnknownTransactionException,
                                  SystemException

  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). The complete method is used for this purpose.

  Throws:
    `UnknownTransactionException`
    `SystemException`

### transactionIdentifier

    public abstract java.lang.String transactionIdentifier()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD