12.3 Classes to be loaded and the class path required for loading

The annotation information is read when the operations such as those listed below are executed:

#
This operation is executed on the library JAR classes.

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

[Figure]

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)

Modulemetadata-complete tag of the DDDD is omitted
false or tag is omittedtrue
EJB-JAR (3.0)Y--Y
WAR (2.5)Y--Y
Legend:
Y: Annotation information is obtained
--: Annotation information is not obtained

The following table describes whether to obtain the annotation information for the library JAR.

Table 12-4 For the library JAR

ModuleJ2EE application compliant with Java EE 5 or laterJ2EE application compliant with J2EE 1.4 or earlier
metadata-complete tag of the DDDD is omitted#metadata-complete tag of the DDDD is omitted
false or tag is omitted#truefalse or tag is omittedtrue
EJB-JAR (3.0)Y--YNN--
WAR (2.5)Y--YNNN
Legend:
Y: Annotation information is obtained (obtained if the J2EE application contains even one relevant module)
--: Annotation information is not obtained
N: Combination is not supported

# 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.


Note
If the class required for reading the annotation information is missing or if the class is invalid, an exception occurs during the process of obtaining the annotation information. The behavior when an exception occurs while a class is being loaded is as follows:
When Application Server version is 08-00 or later
The exception log and message KDJE42380-W is output and the processing continues. Note that if you want to specify an error when an exception is thrown, change the value of the property ejbserver.deploy.annotations.load_check.enabled from false to true.
When Application Server version is earlier than 08-00
An error occurs and the processing is cancelled.