12.5.2 Timing for referencing annotations

The following table describes the timing for referencing annotations when the functionality for controlling the application references is used and when the functionality is not used. Note that the timing for referencing annotations is the same for the reference control functionality of both the J2EE servers and modules.

Table 12-12 Timing for referencing annotations

Timing
(Executed command)
Reference control functionality settingsApplication format
Archive formatExploded archive format
Importing (cjimportapp)UsedNN
Not usedYY
Importing (cjimportwar)UsedNN
Not usedYY
Importing (cjimportres#1)UsedN--
Not usedY--
Starting (cjstartapp#2)UsedNN
Not usedY#3Y
Replacing (cjreplaceapp)UsedN--
Not usedNC--
Reloading (cjreloadapp)Used--N
Not used--Y
Obtaining attributes
(cjgetappprop)
UsedNN
Not usedNN
Setting attributes (cjsetappprop)UsedNN
Not usedNN
Legend:
Not used: Settings for not using the functionality for controlling the application references
Used: Settings for using the functionality for controlling the application references
Y: Annotations are referenced
N: Annotations are not referenced
NC: Annotations are referenced, but the changes are not applied
--: Not applicable
#1: When the cjimportres command is executed by specifying the argument -type ejb or -type war.
#2: Also includes the restarting of the J2EE server.
#3: The annotation is loaded only when the settings differ from when the J2EE server was started previously.

Reference note
If the annotation information is changed after importing the exploded archive format application, the changed annotation information cannot be obtained even if the property file is obtained using the cjgetappprop command. This is because when the property file is obtained, the annotation information is not loaded from the class file.
To obtain the changed annotation information in a property file, execute a command, such as the cjstartapp command, for loading the annotation information from the class file and then obtain the property file.