org.beanlet.web
Annotation Type Request


@ScopeAnnotation
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Request

Request 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 request. This instance is always assigned while performing that particular HTTP request.

XML Representation

The following xml-fragment shows how to express this annotation in xml. The 'request' tag does not specify any element attribute, which means that this tag is applied to the beanlet's class.
<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:request/>
  </beanlet>
</beanlets>

See Also:
ScopeAnnotation



Copyright © 2006-2012. All Rights Reserved.