2.2 javax.annotation package

The following table lists the annotations included in the javax.annotation package:

List of annotations
Annotation nameFunctionality
@PostConstructSpecify the method that is called back immediately after the Servlet and Enterprise Bean instance are generated.
@PreDestroySpecify the method that is called back immediately before deleting the Servlet, Enterprise Bean instance.
@ResourceDeclare the resource reference.
@ResourcesSpecify multiple @Resources.

The following subsections describe the details of each annotation.

Organization of this section
2.2.1 @PostConstruct
2.2.2 @PreDestroy
2.2.3 @Resource
2.2.4 @Resources