|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@ScopeAnnotation @Retention(value=RUNTIME) @Target(value=TYPE) public @interface Stateless
Stateless beanlets do not share any state between subsequent method
invocations. Stateless beanlet instances are pooled and methods called on
stateless beanlet stubs are delegated to one of the pooled instances.
If multiple invocations are made on the same stub reference, different
beanlet instances can be used to perform the call.
Beanlet instances are added and removed from the pool at the container's
discretion. Requesting a beanlet stub through the APIs, or dependency
injection does not necessarily result in the creation of a new beanlet
instance. In general, the number of pooled beanlet instances depends on the
number of concurrent requests made to these stubs.
Stateless beanlets can be configured to be reentrant and
singleton.
<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">
<stateless singleton="false" reentrant="false"/>
</beanlet>
</beanlets>
Stateful,
ScopeAnnotation| Optional Element Summary | |
|---|---|
boolean |
reentrant
Specifies whether the beanlet instances should be reentrant or not. |
boolean |
singleton
Set to true to declare this beanlet to be a singleton beanlet. |
public abstract boolean singleton
true to declare this beanlet to be a singleton beanlet.
Only one beanlet instance will exist at the same time for singleton
beanlets.
public abstract boolean reentrant
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||