Hitachi

uCosminexus Application Server Operation, Monitoring, and Linkage Guide


5.6.1 Replacing the J2EE application

A J2EE application may be switched in order to maintain and upgrade the version of the J2EE application, after the system starts operating.

Normally, to switch a J2EE application, it is necessary to stop the J2EE application that is running on the J2EE server, delete it, and then import and deploy a new J2EE application. The following figure shows the procedure to switch a normal J2EE application:

Figure 5‒14: Procedure for replacing a normal J2EE application

[Figure]

When normally switching a J2EE application, it is necessary to stop the service for the span when the J2EE application is being switched. However, if partial lock of the service is used, you can switch the J2EE application without stopping the service. Moreover, if re-deploy functionality and reload functionality are used, you can switch a J2EE application in fewer steps as compared to normally switching J2EE applications.

The following table describes the methods for switching J2EE applications:

Table 5‒26: Method of switching a J2EE application

Method of switching

Target J2EE applications

Archive format

Expanded archive format

Switch by using partial lock of service Y

Y

Y

Switching by redeploy functionality

Y

--

Switching by reload functionality

--

Y

Legend:

Y: Yes

--: No

The following points describe each method of switching the J2EE application. For details on the replacing methods, see 5.6.3 Replacing and Maintaining a J2EE Application.

When replacing a J2EE application, you can also manage the generation of the J2EE application by renaming the existing J2EE application.

When replacing a J2EE application that requires a 24-hour service, you can replace the J2EE application without stopping the service by partial locking of the Web application service and using CTM.

Organization of this subsection

(1) Replacing a J2EE application by partial locking of the service

This implies partial locking of the service. This method can be used to maintain the system without stopping the service. You can maintain the system without stopping the service by using partial lock of the service when switching a J2EE application that needs to provide non-stop service for 24 hours.

The execution method of the service partial lock differs depending upon the form of J2EE application. For example, in the case of a Web application, the distribution of requests from the load balancer is stopped for the J2EE server on which the J2EE application that is to be switched is running, and then the J2EE application is switched. You can switch the J2EE application without stopping the service by processing the request in another J2EE server during the span when the J2EE application is being switched.

For details on switching the J2EE application by partially locking the service when the J2EE application is a Web application, see 5.6.2 Switching the Web application by partially locking the service.

Reference note

You can also partially lock the service using CTM. For how to switch a J2EE application by locking the CTM schedule queue, see 3.7 Locking and controlling requests in the uCosminexus Application Server Expansion Guide.

(2) Replacing a J2EE application using the re-deploy functionality

When testing during application development and during system operations, if you want to switch a running J2EE application with a corrected J2EE application, you can switch using the re-deploy functionality. The re-deploy is a deployment method of replacing a J2EE application with fewer procedures and at a high speed. You can use this functionality when switching J2EE applications where only the logic is changed. However, if the conditions are not suitable for executing the redeploy functionality, you need to use the normal procedures when switching the J2EE applications. For the conditions in which you can execute the redeploy functionality, see 15.7 Re-deploying J2EE applications in the uCosminexus Application Server Common Container Functionality Guide.

You can use the re-deploy functionality to replace the archive format J2EE applications. The procedures for switching the application using the re-deploy functionality are as follows:

Figure 5‒15: Procedure for replacing the application using the re-deploy functionality

[Figure]

When the re-deploy functionality is used, you can switch the application with a fewer number of steps as compared to switching a normal archive format J2EE application.

Reference note

Hitachi recommends that you execute the JSP pre-compile functionality before executing the re-deploy. The JSP pre-compile functionality is a functionality that compiles the JSP files included in the Web application before the files are deployed and generates the class files. The class files are already generated, so the response time, when the request reaches JSP for the first time and the start-up time of the WEB application can be reduced. For the JSP pre-compile functionality, see 2.5 Storing the JSP pre-compile functionality and compilation results in the uCosminexus Application Server Web Container Functionality Guide.

For the redeploy functionality, see 15.7 Re-deploying J2EE applications in the uCosminexus Application Server Common Container Functionality Guide.

(3) Replacing a J2EE application using the reload functionality

When testing during application development and during system operations, if you want to switch a running J2EE application with a changed J2EE application you can switch them by using the reload functionality. You can reload the updated J2EE application using update notification and command execution, when a file in the expanded archive format J2EE application is updated. By using the reload functionality, the J2EE application is replaced dynamically using fewer steps.

The process of switching with the reload functionality can be used to switch the expanded archive format J2EE applications. The procedure of switching an application by using the reload functionality is as follows:

Figure 5‒16: Switching an application by using the reload functionality

[Figure]

When the reload functionality is used, you can switch an application in less number of steps as compared to switching a normal expanded archive format J2EE application.

For the reload functionality, see 15.8 Detecting updates and reloading J2EE applications in the uCosminexus Application Server Common Container Functionality Guide.

For replacing and maintaining a J2EE application, see 5.6.3 Replacing and Maintaining a J2EE Application. For the operations of the server management commands, see 3. Basic Operations of Server Management Commands in the uCosminexus Application Server Application Setup Guide.