com.ibm.ws.activity
Interface WebSphereUserActivity

All Superinterfaces:
UserActivity

public interface WebSphereUserActivity
extends UserActivity


Method Summary
 Outcome complete(GlobalId gid)
          Causes the Activity context identified by the given GlobalId to be completed with its current CompletionStatus.
 Outcome completeWithStatus(GlobalId gid, int status)
          Causes the Activity context identified by the specified GlobalId to complete with the specified CompletionStatus.
 ActivityCoordinator getActivityCoordinator(GlobalId gid)
          Returns the ActivityCoordinator identified by the specified GlobalId.
 PropertyGroup getPG(java.lang.String name)
          Returns the instance of the type of PropertyGroup, identified by name, scoped to the active Activity.
 
Methods inherited from interface com.ibm.ws.javax.activity.UserActivity
begin, broadcast, complete, completeWithStatus, forget, getCompletionStatus, getCoordinator, getGlobalId, getName, getParentCoordinator, getPropertyGroup, getService, getStatus, getTimeout, recover, recreate, registerService, setCompletionStatus, setTimeout
 

Method Detail

getPG

public PropertyGroup getPG(java.lang.String name)
                    throws ServiceNotRegisteredException,
                           PropertyGroupUnknownException
Returns the instance of the type of PropertyGroup, identified by name, scoped to the active Activity. The PropertyGroup identified by name must be supported by the ServiceManager for this UserActivity instance.

Parameters:
name - the name of the type of PropertyGroup to return.
Returns:
A PropertyGroup instance of the type indicated by name or null if there is no Activity associated with the calling thread.
Throws:
PropertyGroupUnknownException - Thrown if the named PropertyGroup type is not recognized.
ServiceNotRegisteredException - Thrown if no ServiceManager has been registered.

complete

public Outcome complete(GlobalId gid)
                 throws ServiceNotRegisteredException,
                        NoActivityException,
                        SystemException,
                        ContextPendingException,
                        NotOriginatorException,
                        ActivityPendingException,
                        ActivityNotProcessedException
Causes the Activity context identified by the given GlobalId to be completed with its current CompletionStatus. If a CompletionSignalSet is used by the registered ServiceManager, then it will be driven by the Activity service to obtain completion signals to distribute to any registered Actions.
If the Activity is nested within a parent, then the parent Activity becomes associated with the thread on completion of this operation.
If there are any child active or suspended Activities or transactions and the CompletionStatus is CompletionStatusFail or CompletionStatusFailOnly then those child Activites will have their CompletionStatus set to CompletionStatusFailOnly and any child transaction will be called to setRollbackOnly.

Returns:
The Outcome returned is both set by and given meaning by the SignalSet used for completion. In the absence of a CompletionSignalSet a null Outcome object reference is returned.
Throws:
NoActivityException - Thrown if there is no Activity identifiable by the specified GlobalId.
ActivityPendingException - Thrown if the thread from which the completion is initiated is not the only thread associated with the target Activity. The application response should be to try again later when any asynchronous work on other threads has been suspended.
ContextPendingException - Thrown if the CompletionStatus is CompletionStatusSuccess and the target Activity encompasses active or suspended Activities or transactions. The application response should be to complete the encompassed Activities and transactions and then complete the target Activity or to force the target Activity to end by setting the CompletionStatus to CompletionStatusFail and then ending it.
NotOriginatorException - Thrown if an attempt is made by an application to end an Activity in a different execution environment from that in which the Activity was begun.
ActivityNotProcessedException - Thrown if the signals required to complete this operation could not be produced. The Activity's final Status is StatusError.
ServiceNotRegisteredException - Thrown if no ServiceManager has been registered.
SystemException - Thrown if the Activity service encounters an unexpected error condition.

completeWithStatus

public Outcome completeWithStatus(GlobalId gid,
                                  int status)
                           throws ServiceNotRegisteredException,
                                  NoActivityException,
                                  SystemException,
                                  ContextPendingException,
                                  NotOriginatorException,
                                  ActivityNotProcessedException,
                                  ActivityPendingException,
                                  InvalidStateException
Causes the Activity context identified by the specified GlobalId to complete with the specified CompletionStatus. If a CompletionSignalSet is used by the registered ServiceManager, then it will be driven by the Activity service to obtain completion signals to distribute to any registered Actions.
If the Activity is nested within a parent, then the parent Activity becomes associated with the thread on completion of this operation.
If there are any child active or suspended Activities or transactions and the CompletionStatus is CompletionStatusFail or CompletionStatusFailOnly then those child Activites will have their CompletionStatuses set to CompletionStatusFailOnly and any child transaction will be called to setRollbackOnly.

Returns:
The Outcome returned is both set by and given meaning by the SignalSet used for completion. In the absence of a CompletionSignalSet a null Outcome object reference is returned.
Throws:
NoActivityException - Thrown if there is no Activity identifiable by the specified GlobalId
ActivityPendingException - Thrown if the thread from which the completion is initiated is not the only thread associated with the target Activity. The application response should be to try again later when any asynchronous work on other threads has been suspended.
ContextPendingException - Thrown if the CompletionStatus is CompletionStatusSuccess and the target Activity encompasses active or suspended Activities or transactions. The application response should be to complete the encompassed Activities and transactions and then complete the target Activity or to force the target Activity to end by setting the CompletionStatus to CompletionStatusFail and then ending it.
NotOriginatorException - Thrown if an attempt is made by an application to end an Activity in a different execution environment from that in which the Activity was begun.
InvalidStateException - Thrown if the target Activity cannot be completed with the requested CompletionStatus, for example because the CompletionStatus may not be changed from CompletionStatusFailOnly to any other value, or if a null or invalid value is specified by completionStatus.
ActivityNotProcessedException - Thrown if the signals required to complete this operation could not be produced. The Activity's final Status is StatusError.
ServiceNotRegisteredException - Thrown if no ServiceManager has been registered.
SystemException - Thrown if the Activity service encounters an unexpected error condition.

getActivityCoordinator

public ActivityCoordinator getActivityCoordinator(GlobalId gid)
                                           throws NoActivityException,
                                                  ServiceNotRegisteredException,
                                                  SystemException
Returns the ActivityCoordinator identified by the specified GlobalId.

Returns:
The ActivityCoordinator instance identified by the GlobalId.
Throws:
NoActivityException - Thrown if there is no Activity identifiable by the specified GlobalId
ServiceNotRegisteredException - Thrown if no ServiceManager has been registered.
SystemException - Thrown if the Activity service encounters an unexpected error condition.


 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.