-
Bug
-
Resolution: Done
-
Major
-
None
-
None
JSR 316: JavaEE Platform Specification
Section 5.2.5: Annotations and Deployment Descriptors
—
In some cases a class may need to perform initialization of its own after all
resources have been injected. To support this case, one method of the class may be
annotated with the PostConstruct annotation (or, equivalently, specified using
the post-construct entry of a deployment descriptor). This method will be called
after all injections have occured and before the class is put into service. This
method will be called even if the class doesn't request any resources to be
injected. Similarly, for classes whose lifecycle is managed by the container, the
PreDestroy annotation (or, equivalently, the pre-destroy entry of a deployment
descriptor) may be applied to one method that will be called when the class is
taken out of service and will no longer be used by the container. Each class in a
class hierarchy may have PostConstruct and PreDestroy methods. The order in
which the methods are called matches the order of the class hierarchy with
methods on a superclass being called before methods on a subclass.
- is related to
-
JBWS-3358 Restore @EJB & @Resource injection on JAXWS components on AS7
- Closed