|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@ScopeAnnotation @Retention(value=RUNTIME) @Target(value=TYPE) public @interface Stateful
Stateful beanlet maintain conversational state between calls on the same
object. Stateful beanlets do not provide direct access to the underlying
objects. Instead, clients obtain a stub that delegates invocations to the
underlying instance. In case of stateful beanlets, the stub always delegates
invocation to the same instance.
A new beanlet instance is created for each beanlet that is explicitely
requested throuh the APIs, or implicitely through dependency injection.
Stateful beanlets are non reentrant by default, which means that only
one thread can invoke a method of the beanlet instance at the same time.
This feature is provided by the stub, which controls all access to the
underlying instance. Stateful beanlets can also be configured to be reentrant.
<beanlets xmlns="http://beanlet.org/schema/beanlet"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://beanlet.org/schema/beanlet http://beanlet.org/schema/beanlet/beanlet_1_0.xsd">
<beanlet name="foo" type="com.acme.Foo">
<stateful reentrant="false"/>
</beanlet>
</beanlets>
Stateless,
ScopeAnnotation| Optional Element Summary | |
|---|---|
boolean |
reentrant
Specifies whether the beanlet instances should be reentrant or not. |
public abstract boolean reentrant
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||