|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@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.
<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>
RetentionPolicy| Optional Element Summary | |
|---|---|
Class<? extends Throwable>[] |
type
|
RetentionPolicy |
value
|
public abstract Class<? extends Throwable>[] type
public abstract RetentionPolicy value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||