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 and Description |
---|
WorkAreaAvailabilityHelper() |
Modifier and Type | Method and Description |
---|---|
static boolean |
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.
|
public static boolean 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. 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 calling
UserWorkArea.begin
or an exception will result.