The annotation information is read when the operations such as those listed below are executed:
To read the annotation information, you must first load the classes.
The following figure shows the classes loaded for reading the annotation information.
Figure 12-2 Classes loaded for reading the annotation information
Note that the annotation when the annotation information is read from the class files included in the EJB-JAR (ejb-jar.xml version 2.1) or from the class files included in the WAR (web.xml version 2.4) is a Cosminexus Application Server-specific specification. However, this functionality is used for compatibility with earlier versions. For details, see 5.4 Using annotations with EJB 2.1 and Servlet 2.4 in the uCosminexus Application Server Compatibility Guide.
Note that in the J2EE applications compliant with J2EE 1.4 or earlier, the library JAR cannot be used from the EJB-JAR (ejb-jar.xml version 2.1, or ejb-jar.xml is omitted) and WAR (web.xml version 2.4). The library JAR is ignored even if specified.
The loading of a class for obtaining the annotation information depends on the version of each module and the attributes defined in the DD.
The following table lists the conditions for determining whether to obtain the annotation information when the module version is EJB-JAR (3.0) or WAR (2.5).
Table 12-3 When the module version is EJB-JAR (3.0) or WAR (2.5)
Module | metadata-complete tag of the DD | DD is omitted | |
---|---|---|---|
false or tag is omitted | true | ||
EJB-JAR (3.0) | Y | -- | Y |
WAR (2.5) | Y | -- | Y |
The following table describes whether to obtain the annotation information for the library JAR.
Table 12-4 For the library JAR
Module | J2EE application compliant with Java EE 5 or later | J2EE application compliant with J2EE 1.4 or earlier | ||||
---|---|---|---|---|---|---|
metadata-complete tag of the DD | DD is omitted# | metadata-complete tag of the DD | DD is omitted | |||
false or tag is omitted# | true | false or tag is omitted | true | |||
EJB-JAR (3.0) | Y | -- | Y | N | N | -- |
WAR (2.5) | Y | -- | Y | N | N | N |
# If you specify false in the value of the property ejbserver.deploy.annotations.load_libjars.enabled, the annotation information in the library JAR classes will not be obtained.