The following table lists the annotations included in the javax.annotation package:
Annotation name | Functionality |
---|---|
@PostConstruct | Specify the method that is called back immediately after the Servlet and Enterprise Bean instance are generated. |
@PreDestroy | Specify the method that is called back immediately before deleting the Servlet, Enterprise Bean instance. |
@Resource | Declare the resource reference. |
@Resources | Specify multiple @Resources. |
The following subsections describe the details of each annotation.