Annotation Type Session

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.

XML Representation

The following xml-fragment shows how to express this annotation in xml. The 'session' tag does not specify any element attribute, which means that this tag is applied to the beanlet's class. The attribute can be specified optionally if the annotation specifies a default value for the particular annotation method.
<beanlets xmlns=""
  <beanlet name="foo" type="com.acme.Foo">
    <web:session reentrant="false"/>

See Also:

Optional Element Summary
 boolean reentrant
          Specifies whether the beanlet instances should be reentrant or not.


public abstract boolean reentrant
Specifies whether the beanlet instances should be reentrant or not. Instances of reentrant beanlets can be invoked by multiple threads at the same time.


Copyright © 2006-2012. All Rights Reserved.