com.ibm.wsspi.workarea
Class WorkAreaAvailabilityHelper
- java.lang.Object
com.ibm.wsspi.workarea.WorkAreaAvailabilityHelper
- public class WorkAreaAvailabilityHelper
- extends java.lang.Object
This helper class can be used to determine if the WorkArea service is available. "Available" means that the user is executing within the boundaries of a valid container.
Constructor Summary
Constructor and Description |
---|
WorkAreaAvailabilityHelper()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
isWithinContainerBoundary()
This method is used to determine if the caller is executing within the boundary of a container which is supported
by the WorkArea service.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
WorkAreaAvailabilityHelper
- public WorkAreaAvailabilityHelper( )
Method Detail
isWithinContainerBoundary
- public static boolean isWithinContainerBoundary( )
Returns:
boolean - true means that the user is executing within the boundary of a container which is supported by
the WorkArea service. False means that the user is not executing within the boundary of a
container which is supported by the WorkArea service.
This method is used to determine if the caller is executing within the boundary of a container which is supported by the WorkArea service. Currently a valid container is a client, ejb or web container (and w.r.t to WorkArea, AsynchBeans POJO execution is considered to be within a "container" boundary). This info is beneficial to a user because if they call
UserWorkArea.begin
method, and the WorkArea service is not available, an exception will be thrown. To avoid an exception, a user can first call this method which simply returns a boolean indicating the availability of the WorkArea service. If false is returned (meaning the user is not executing within the boundary of a valid container), the user knows they need to forgo callingUserWorkArea.begin
or an exception will result.