|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines the set of ActivitySession operations available to an application component. An implementation of this interface is obtained via a JNDI lookup of the URL "java:comp/websphere/UserActivitySession. The UserActivitySession interface is used to begin and end ActivitySessions and to query various attributes of the active ActivitySession associated with the thread.
Field Summary | |
---|---|
static int |
EndModeCheckPoint
Attempt to CheckPoint all ActivitySessionResources |
static int |
EndModeReset
Attempt to Reset all ActivitySessionResources |
static int |
StatusNoSession
There is no active ActivitySession associated with the calling thread |
static int |
StatusSessionActive
There is an active ActivitySession associated with the calling thread |
static int |
StatusSessionCompleted
The ActivitySession associated with the calling thread has completed |
static int |
StatusSessionCompleting
The ActivitySession associated with the calling thread is in the process of ending |
static int |
StatusUnknown
The ActivitySession service is unable to determine the status of the ActivitySession associated with the calling thread. |
Method Summary | |
---|---|
void |
beginSession()
Create a new ActivitySession and associate it with the current thread. |
void |
checkpointSession()
CheckPoints all the ActivitySessionResources involved in the current ActivitySession but allows further work within the ActivitySession. |
void |
endSession(int EndMode)
Complete the ActivitySession associated with the current thread and CheckPoints or Resets all the ActivitySessionResources involved in it. |
java.lang.String |
getSessionName()
Obtain the name of the ActivitySession associated with the thread. |
int |
getSessionTimeout()
Returns the default timeout value. |
int |
getStatus()
Obtain the status of the ActivitySession associated with the current thread. |
void |
resetSession()
Resets all the ActivitySessionResources involved in the current ActivitySession but allows further work within the ActivitySession. |
void |
setResetOnly()
Marks the ActivitySession associated with the current thread such that the only possible outcome is Reset. |
void |
setSessionTimeout(int timeout)
Sets the default timeout, in seconds, after which any subsequently started ActivitySessions may be automatically completed by the ActivitySession service. |
Field Detail |
public static final int EndModeCheckPoint
public static final int EndModeReset
public static final int StatusSessionActive
public static final int StatusSessionCompleting
public static final int StatusSessionCompleted
public static final int StatusNoSession
public static final int StatusUnknown
Method Detail |
public void beginSession() throws ActivitySessionAlreadyActiveException, TransactionPendingException, NotSupportedException, SystemException
ActivitySessionAlreadyActiveException
- Thrown if the thread is already
associated with a session.
TransactionPendingException
- Thrown if the thread is associated with
a transaction. ActivitySessions may not be nested within transactions.
NotSupportedException
- Thrown if the access to the UserActivitySession
interface is not allowed, for example if the caller is executing under
an ActivitySession container policy of ActivitySessionNotSupported
SystemException
- Thrown if the ActivitySession service
encounters an unexpected error conditionpublic void endSession(int EndMode) throws ActivitySessionPendingException, ContextPendingException, NoActivitySessionException, NotOriginatorException, MixedOutcomeException, ActivitySessionResetException, NotSupportedException, SystemException
EndMode
- indicates the EndMode
with which
enlisted ActivitySessionResources should be directed to complete.
ActivitySessionPendingException
- Thrown to indicate that there is outstanding
asynchronous work associated with the ActivitySession. The ActivitySession
remains active.
ContextPendingException
- Thrown if there is a contained transaction
that has not been completed and the EndMode is EndModeCheckPoint. The
ActivitySession and transaction contexts remain unchanged.
NoActivitySessionException
- Thrown to indicate that no ActivitySession is associated
with the current thread.
NotOriginatorException
- Thrown to indicate that the calling thread does
not belong in the originating execution environment and that this
operation is therefore disallowed.
MixedOutcomeException
- Thrown if the ActivitySessionResources
enlisted in the ActivitySesison were not all completed
in the same direction. An array of NotProcessedExceptions indicates
the resources that were Reset.
ActivitySessionResetException
- Thrown if a request to checkpoint resulted
in all the ActivitySessionResources being reset.
NotSupportedException
- Thrown if the access to the UserActivitySession
interface is not allowed, for example if the caller is executing under
an ActivitySession container policy of ActivitySessionNotSupported
SystemException
- Thrown if the ActivitySession service
encounters an unexpected error conditionpublic void resetSession() throws ActivitySessionPendingException, NoActivitySessionException, NotOriginatorException, NotSupportedException, SystemException
ActivitySessionPendingException
- Thrown to indicate that there is outstanding
asynchronous work associated with the ActivitySession.
No ActivitySessionResources are Reset
NoActivitySessionException
- Thrown to indicate that no ActivitySession is associated
with the current thread.
NotOriginatorException
- Thrown to indicate that the calling thread does
not belong in the originating execution environment and that this
operation is therefore disallowed.
NotSupportedException
- Thrown if the access to the UserActivitySession
interface is not allowed, for example if the caller is executing under
an ActivitySession container policy of ActivitySessionNotSupported
SystemException
- Thrown if the ActivitySession service
encounters an unexpected error conditionpublic void checkpointSession() throws ActivitySessionPendingException, NoActivitySessionException, NotOriginatorException, MixedOutcomeException, ActivitySessionResetException, NotSupportedException, SystemException
ActivitySessionPendingException
- Thrown to indicate that there is outstanding
asynchronous work associated with the ActivitySession.
No ActivitySessionResources are CheckPointed.
NoActivitySessionException
- Thrown to indicate that no ActivitySession is associated
with the current thread.
NotOriginatorException
- Thrown to indicate that the calling thread does
not belong in the originating execution environment and that this
operation is therefore disallowed.
MixedOutcomeException
- Thrown if the ActivitySessionResources
enlisted in the ActivitySesison were not all completed
in the same direction. An array of NotProcessedExceptions indicates
the resources that were Reset.
ActivitySessionResetException
- Thrown if a request to checkpoint resulted
in all the ActivitySessionResources being reset.
NotSupportedException
- Thrown if the access to the UserActivitySession
interface is not allowed, for example if the caller is executing under
an ActivitySession container policy of ActivitySessionNotSupported
SystemException
- Thrown if the ActivitySession service
encounters an unexpected error conditionpublic int getStatus() throws SystemException
StatusNoSession
SystemException
- Thrown if the ActivitySession service
encounters an unexpected error conditionpublic java.lang.String getSessionName() throws SystemException
SystemException
- Thrown if the ActivitySession service
encounters an unexpected error conditionpublic void setSessionTimeout(int timeout) throws TimeoutOutOfRangeException, SystemException
timeout
- the default time, in seconds, after which an ActivitySession
may be automatically Reset by the ActivitySession service.
TimeoutRangeException
- Thrown if timeout
is less than
-1 or if it is greater than 1000000000 (1 billion).
SystemException
- Thrown if the ActivitySession service encounters
an unexpected error condition.
TimeoutOutOfRangeException
public int getSessionTimeout() throws SystemException
SystemException
- Thrown if the ActivitySession service encounters
an unexpected error condition.public void setResetOnly() throws NoActivitySessionException, SystemException
NoActivitySessionException
- Thrown to indicate that no ActivitySession is associated
with the current thread.
SystemException
- Thrown if the ActivitySession service
encounters an unexpected error condition
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |