|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface PostConstruct
The PostConstruct annotation is used on a method that needs to be
executed after dependency injection is done to perform any initialization.
Such methods are so-called post construct methods. This annotation is
also supported for interceptor methods, further referred to as
post-construct lifecycle methods.
PostConstruct methods are invoked by the container before
beanlet instances are put into service. The post-construct method is
called even if the class does not request any resources to be injected.
The beanlet instance is not put into service if an exception is thrown by
this method.
PostConstruct annotation is applied MUST fulfill all of the following
criteria:
InterceptorContext object.
PostConstruct is applied MAY be
public, protected, package private or private.
static.
final.
<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">
<post-construct method="bar"/>
</beanlet>
</beanlets>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||