Hitachi

uCosminexus Application Server Application Setup Guide


10.5.1 Applications in archive format

The procedure for using the redeploy functionality to switch the archive format J2EE applications, imported into the J2EE server, to another J2EE application are as follows:

  1. Compile the Java program to be updated.

  2. Regenerate the EJB-JAR and WAR files.

  3. Regenerate the EAR files.

  4. Execute the redeploy command.

Execute the following redeploy command to switch the archive format J2EE applications (EAR files):

Execution format
cjreplaceapp [server-name] [-nameserver provider-URL] -name application-name -f EAR- file- path [-t timeout-period (seconds)] [-replaceDD]
Example of execution
cjreplaceapp MyServer -name App1 -f App1.ear -t 120

When switching between the J2EE applications, all the attributes of the J2EE applications can be inherited or only the runtime attributes (standalone definitions of attribute files) can be inherited. To inherit the runtime attributes only, specify the -replaceDD option.

For details on the cjreplaceapp command, see cjreplaceapp (replace application) in the uCosminexus Application Server Command Reference Guide.

Note:
  • You can perform this operation regardless of whether the J2EE application is running or has stopped. When switching a running J2EE application, if you execute the cjreplaceapp command, the J2EE application that is being processed is stopped once and is restarted after switching.

    Note that when a running J2EE application is not terminated normally, the J2EE application is terminated forcibly. If you specify the timeout period in the -t option, you can set the time when the J2EE application will move to forced termination. When the timeout period is not specified in the -t option, the application will move to forced termination after 60 seconds.

  • In the switching of applications where JSP pre-compile is executed, if you want to use the JSP pre-compile functionality even after switching the applications, the JSP compilation result must be included in the applications to be switched. If the JSP compilation result is not included in the applications to be switched, run JSP pre-compile for each Web application and include the JSP compilation result in the applications to be switched.

  • When you use the redeploy functionality in the applications that contain cosminexus.xml, the definition information of cosminexus.xml before switching is destroyed and restored to the default value, and the definition information of cosminexus.xml after switching is overwritten. Therefore, the definition information of each Cosminexus Application Server instance that is changed using server management commands is lost in the execution environment.