|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
S
- the type of the external instance storagepublic interface BoundContext<S>
Allows a thread-based context to be bound to some external instance storage (such as an HttpSession).
A context may be detachable in which case a call to
ManagedContext.invalidate()
will detach the context from it's
associated storage. A detached context is still usable (instances may be
added or removed) however changes will not be written through to the
underlying data store.
Normally, a detachable context will have it's underlying bean store attached
on a call to ManagedContext.activate()
and detached on a call to
ManagedContext.deactivate()
however a subtype of BoundContext
may change this behavior.
If you call associate(Object)
you must ensure that you call
dissociate(Object)
in all cases, otherwise you risk memory leaks.
ManagedContext
Method Summary | |
---|---|
boolean |
associate(S storage)
Associate the context with the storage (for this thread). |
boolean |
dissociate(S storage)
Dissociate the context from the storage (for this thread). |
Methods inherited from interface javax.enterprise.context.spi.Context |
---|
get, get, getScope, isActive |
Method Detail |
---|
boolean associate(S storage)
associate(Object)
has been called, further calls to
associate(Object)
will be ignored, until the context has been
subsequently dissociate(Object)
from the storage.
storage
- the external storage
boolean dissociate(S storage)
storage
- the external storage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |