org.beanlet
Annotation Type Retention


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

Indicates what action is to be taken in case an exception is encountered on beanlet invocation.

Beanlet instances are returned to the pool after invocation automatically, unless an exception is raised that matches the exception type specified by this annotation. In this case, the retention policy is executed as specified.

XML Representation

The following xml-fragment shows how to express this annotation in xml.
<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">
    <retention value="INVALIDATE">
      <class type="java.lang.RuntimeException"/>
      <class type="java.lang.Error"/>
    </retention>
  </beanlet>
</beanlets>

See Also:
RetentionPolicy

Optional Element Summary
 Class<? extends Throwable>[] type
           
 RetentionPolicy value
           
 

type

public abstract Class<? extends Throwable>[] type
Default:
{java.lang.RuntimeException.class, java.lang.Error.class}

value

public abstract RetentionPolicy value
Default:
org.beanlet.RetentionPolicy.INVALIDATE


Copyright © 2006-2012. All Rights Reserved.