|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@ScopeAnnotation @Retention(value=RUNTIME) @Target(value=TYPE) public @interface Session
Session 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 request beanlets,
the stub creates a new instance per HTTP session. This instance is always
assigned while performing a request for that particular HTTP session.
Session beanlet instances only exist while the session, for which they were
created, is active. These beanlet instances are destroyed when their HTTP
session is invalidated or expired.
Session 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. Session beanlets can also be configured to be reentrant.
<beanlets xmlns="http://beanlet.org/schema/beanlet"
xmlns:web="http://beanlet.org/schema/web"
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
http://beanlet.org/schema/web http://beanlet.org/schema/web/beanlet_web_1_0.xsd">
<beanlet name="foo" type="com.acme.Foo">
<web:session reentrant="false"/>
</beanlet>
</beanlets>
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 | |||||||||