uCosminexus Application Server, Common Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

12.6.3 Referencing and updating the definitions with the server management commands

The elements defined in the annotation can be referenced by using the server management commands the cjgetappprop command or the cjgetresprop command. Also, some of the definitions can be updated by using the cjsetappprop command or the cjsetresprop command.

Organization of this subsection
(1) Operations for referencing or updating the elements defined in the annotations
(2) Updating the definitions by using the server management commands

(1) Operations for referencing or updating the elements defined in the annotations

The following table describes the operations when the server management commands are used to reference or update the elements defined in the annotations. The operations differ when a DD exists and when a DD does not exist.

Table 12-17 Operations when the server management commands are used to reference or update the elements defined in the annotations

Element types Reference using cjgetappprop or cjgetresprop Update using cjsetappprop or cjsetresprop
When a DD exists Elements defined in the DD The contents defined in the DD are output. The contents of the DD are updated.
Elements defined in the annotation The contents defined in the annotation are output. Cannot be updated.
Elements in which the annotation definition is overwritten with the DD The result of merging the definitions of the annotation and DD are output. See (2) Updating the definitions by using the server management commands.
When a DD does not exist Elements defined in the annotation The contents defined in the annotation are output. Cannot be updated.

(2) Updating the definitions by using the server management commands

Whether the attributes defined in the annotation by using the cjsetappprop command or the cjsetresprop command can be overwritten and updated depends on where the information to be updated is defined.

The following table describes the mapping between the definition location and overwritability.

Table 12-18 Mapping between the definition location and overwritability

Definition location Overwritability
Elements only defined in the DD Can be overwritten
Elements only defined in the annotation Cannot be overwritten
Elements in which the annotation definition is overwritten by the DD Can be overwritten #

#: When the application is exported after update, the contents defined in the annotation and the DD are merged and output to the DD (web.xml) in the WAR file included in the exported application. For the applications in the exploded archive format, the contents defined in the annotation and the DD are merged and output to WAR-directory/WEB-INF/web.xml.


Notes

When you use the cjsetappprop command or the cjsetresprop command to overwrite and update the elements in which the annotation definition is overwritten by the DD, the DD and the annotation information is merged and output to the DD in the application directory. In this case, when you subsequently change the annotation in the class file in order to apply the contents defined in the annotation to the DD, the definition remaining in the DD is given priority and the changed annotation definition is not enabled.

In such cases, delete the annotation definition applied to the DD and re-import the application to enable the annotation definition. Also, when you add or change the definitions in the property file, you need not re-import the application.