If you want to replace a modified J2EE application and a running J2EE application when testing during application development and during system operations, you can replace the applications by using the reload functionality. When a file configuring an exploded archive-format J2EE application is updated, you can reload the updated J2EE application by using update detection and command execution. By using the reload functionality, the J2EE application is replaced dynamically using fewer steps.
This subsection describes the settings for detecting updates and reloading the exploded archive-format J2EE applications. For details on the commands and file keys, see the uCosminexus Application Server Command Reference Guide and uCosminexus Application Server Definition Reference Guide.
The settings required for reloading an exploded archive-format J2EE application differ depending on whether the application is reloaded by detecting the configuration file updates or whether the application is reloaded by executing commands. The following table describes the settings required for reloading the exploded archive-format J2EE applications.
Table 13-17 Settings required for reloading
Settings | To reload by detecting updates | To reload by using commands |
---|---|---|
Setting the scope for the reload functionality | Y | Y |
Setting the update detection interval | Y | -- |
Setting the interval for configuration file update | Y | -- |
Settings for delayed reloading | Y | -- |
Changing the directory for storing the session information file | R | R |
Settings for JSP pre-compilation | R | R |
Settings for monitoring the J2EE application execution time | R | R |
Specify the settings for the scope of the reload functionality in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file.
By default, the reload functionality is disabled. To use the reload functionality, you must enable the reload functionality and set the scope.
Note that the enabling or disabling of the reload functionality is decided based upon the combination of the scope of the local call optimization functionality specified in the ejbserver.rmi.localinvocation.scope parameter of usrconf.properties and the scope of the reload functionality. For details on the mapping between the scope of the local call optimization functionality and the scope of the reload functionality, see 13.8.2 Scope of reloading.
Specify the settings for the update detection interval in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file. The following table describes the settings for the update detection interval specified in the Easy Setup definition file.
Table 13-18 Settings for the update detection interval in the Easy Setup definition file
Specified parameters | Settings |
---|---|
ejbserver.deploy.context.check_interval | Specify the interval (seconds) for monitoring the J2EE application configuration file and detecting the updates. |
webserver.context.check_interval | Specify the interval (seconds) for monitoring the Web application configuration file and detecting the updates. |
webserver.jsp.check_interval | Specify the interval (seconds) for monitoring the JSP configuration file and detecting the updates. |
The relationship between the setup values of the update detection interval is as follows:
Specify the interval for configuration file update in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file. The following table describes the settings for the configuration file update interval specified in the Easy Setup definition file.
Table 13-19 Settings for the configuration file update interval in the Easy Setup definition file
Specified parameters | Settings |
---|---|
ejbserver.deploy.context.update.interval | Specify the time (seconds) required for copying the J2EE application configuration file. |
webserver.context.update.interval | Specify the time (seconds) required for copying the Web application configuration file. |
webserver.jsp.update.interval | Specify the time (seconds) required for copying the JSP configuration file. |
The relationship between the setup values of the interval for configuration file update is as follows:
Specify the settings for delayed reloading in the following parameter in the <configuration> tag of the logical J2EE server (j2ee-server) in the Easy Setup definition file:
When the Web applications are reloaded, the session information generated before reloading is inherited and used even after reloading. The session information is output to the session information file.
Character before conversion | Character after conversion |
---|---|
/ | $2f |
$ | $24 |
% | $25 |
+ | $2b |
To change the output destination of the session information file, specify the settings in the Easy Setup definition file. Specify the following parameter in the <configuration> tag of the logical J2EE server (j2ee-server):
<configuration> |
Even when a class file generated from a JSP file using JSP pre-compile is updated, the update of the J2EE application configuration file is detected and the reload functionality is executed.
When you execute the JSP pre-compile functionality by specifying the -jspc option in the cjstartapp command, you must set up the JSP working directory using usrconf.properties. For details on the JSP pre-compile settings, see 2.5.8 Settings in the execution environment (J2EE server settings) in the uCosminexus Application Server Web Container Functionality Guide.
Note that when you use the cjjspc command to execute JSP pre-compile during application development, specify the details such as the JSP working directory in the command options. For details on using the cjjspc command for JSP pre-compilation, see 2.5 JSP pre-compile functionality and the storage of the compilation results in the uCosminexus Application Server Web Container Functionality Guide.
When a configuration file update is detected, the reload processing starts when the processing of the requests being processed is complete, but if the processing of requests being processed is not over at this point, you can start the reload processing by implementing the method timeout and method cancellation functionality for the monitoring of the J2EE application execution time.
As and when required, you specify the settings for monitoring the J2EE application execution time. For details on the settings for monitoring the J2EE application execution time, see 5.3.9 Settings in the execution environment in the uCosminexus Application Server Operation, Monitoring, and Linkage Guide.