|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserWorkArea
The UserWorkArea interface defines the methods that allow an application to define and populate contextual boundaries. Remote method calls that originate from within a contextual boundary will automatically propagate the boundary information and the contained context so that the remote methods will operate within a client's context. This context is explicitely thread-scoped; two threads may never share the same context. Contexts may be nested; an inner context will automatically inherit the outer context; changes made within an inner context will be removed when the inner context is completed and the outer context will be restored to its state before the inner context was begun. Note that changes made on a remote node will not be propagated back upstream into the invoking client's context if the partition is defined to be unidirectional. Changes made on a remote node will be propagated back upstream into the invoking client's context if the partition is defined to be bidirectional. Note that the UserWorkArea reference is only to be used within application-defined methods; the UserWorkArea methods should not be invoked from within ejb framework methods, servlet initialization, etc; attempts to do so will likely result in an InvalidState exception. Successful invocations outside application logic will not be guaranteed in any future releases.
Method Summary | |
---|---|
void |
begin(java.lang.String name)
Begin a new WorkArea associated with it the current thread. |
void |
complete()
Will complete the current, active WorkArea and will lose the references to any contained context. |
java.io.Serializable |
get(java.lang.String key)
The get operation will search the current WorkArea for a corresponding property. |
PropertyModeType |
getMode(java.lang.String key)
The getMode operation will search the current WorkArea for a corresponding property's mode. |
java.lang.String |
getName()
Returns the context's name. |
void |
remove(java.lang.String key)
Removes property from current WorkArea scope. |
java.lang.String[] |
retrieveAllKeys()
Returns an array of all keys associated with the stack of WorkAreas for the current thread. |
void |
set(java.lang.String key,
java.io.Serializable value)
Set the specified property. |
void |
set(java.lang.String key,
java.io.Serializable value,
PropertyModeType mode)
Sets given property by mode. |
Method Detail |
---|
void begin(java.lang.String name)
name
- The name that will be associated with this WorkArea. Note
that the WorkArea service attaches no meaning to this name;
it is instead to be used by the application as desired. The
WorkArea service requires only that the name not be null.
java.lang.NullPointerException
- Thrown if the name reference is null.void complete() throws NoWorkArea, NotOriginator
NoWorkArea
- Thrown if there is no active WorkArea associated with
the current thread.
NotOriginator
- Thrown if the WorkArea was imported from another process.java.lang.String getName()
java.lang.String[] retrieveAllKeys()
void set(java.lang.String key, java.io.Serializable value) throws NoWorkArea, NotOriginator, PropertyReadOnly
key
- May not be null.value
- May not be null.
NoWorkArea
- Thrown if there is no active WorkArea associated with the thread.
NotOriginator
- Thrown if the active WorkArea was imported from another process.
PropertyReadOnly
- Thrown if the corresponding property was set as read_only.
java.lang.NullPointerException
- Thrown if the key is null.void set(java.lang.String key, java.io.Serializable value, PropertyModeType mode) throws NoWorkArea, NotOriginator, PropertyReadOnly
key
- May not be null.value
- May not be null.mode
- May not be null.
NoWorkArea
- Thrown if there is no active WorkArea associated with the thread.
NotOriginator
- Thrown if the active WorkArea was imported from another process.
PropertyReadOnly
- Thrown if the corresponding property was set as read_only.
java.lang.NullPointerException
- Thrown if the key or mode is null.java.io.Serializable get(java.lang.String key)
key
- The key to search by. May not be null.
NotSerializableError
- Thrown if the corresponding is not serializable (i.e., was set via a CORBA interface)
java.lang.NullPointerException
- Thrown if the key is null.PropertyModeType getMode(java.lang.String key)
key
- The key to search by. May not be null.
java.lang.NullPointerException
- Thrown if the key is null.void remove(java.lang.String key) throws NoWorkArea, NotOriginator, PropertyFixed
key
- May not be null.
NoWorkArea
- Thrown if there is no active WorkArea associated with the thread.
NotOriginator
- Thrown if the operation is invoked against a WorkArea imported from another process.
PropertyFixed
- Thrown if the property was set as fixed.
java.lang.NullPointerException
- Thrown if the key is null.
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |