Hitachi

uCosminexus Application Server Operation, Monitoring, and Linkage Guide


5.4.1 Locking the Web Application Service and Releasing the Lock

Locking the Web application service implies locking of services of the J2EE application that fronts the Web application. For example, the Web application service is locked when stopping services during non-business hours and during system maintenance.

Organization of this subsection

(1) Locking the services

The following are the five methods of locking the Web application services:

#1

When changing the distribution destination of requests in the load balancer, you use the following functionality of the load balancer to continue a request process being executed, without returning an error:

  • Functionality that maintains the connection between the load balancer prior to change and the Web server, until the completion of the request process, when changing the distribution destination of request.

#2

When stopping the load balancer, you use the following functionality of the load balancer to continue a request process being executed while the load balancer is stopped, without returning an error:

  • Functionality that maintains the connection between the load balancer and the Web server until the completion of the request process, when the load balancer stops

#3

Stopping the Web server is possible only when using Cosminexus HTTP Server as the Web server. When using Microsoft IIS, this method cannot be used since an error is returned to the request being executed.

(2) Service lock in a system configuration using the load balancer

The procedure to lock a service differs depending upon whether a load balancer is used or not. This section explains the locking of a service by changing the distribution destination of the request in the load balancer.

When using the load balancer to change the distribution destination of requests, it is necessary to deploy a Web server for service locks. After locking the running Web applications, set the load balancer to forward requests to the Web server for service locks.

The following figure shows the distribution of requests before and after service lock:

Figure 5‒11: Distribution of requests before and after service lock

[Figure]

Note that in the Web server for service locks, an error page is returned when a request comes after locking the Web application service.

The displayed error page can also be customized. For the displayed error page, see (3) Displaying the error page.

(3) Displaying the error page

An error page is displayed in the client when the services of a locked Web application are accessed. The displayed error page is any one of the following:

(a) Method of locking the service and the displayed error page

The displayed error page differs depending upon the method of locking the Web application service. The following table shows the method of locking the service and the displayed error page:

Table 5‒17: Method of locking the service and the displayed error page

Method of locking the service

Displayed error page

Changing the distribution destination of requests in the load balancer

Error page set in the Web server for service locks

Stopping the load balancer

Connection error page

Stopping the Web server

Connection error page#1

Stopping the J2EE server

The page displaying any of the following error status codes

  • 404 error #2

  • 500 error#3

  • 503 error #4

Stopping the application

The page displaying any of the following error status codes

  • 404 error #5

  • 503 error #4

#1

If the load balancer is used, it depends upon the specifications of the used load balancer.

#2

404 error, displayed when the J2EE server is stopped, is returned for the requests that have reached the J2EE server when the application is stopped, but not reached the pending queue of the Web application.

#3

500 error is returned for the requests that have not yet arrived at the J2EE server when the application stops.

#4

503 error is returned for the requests that are in the pending queue of the Web application when the application is stopped.

#5

404 error, displayed when the application is stopped, is returned for the requests that have not reached the pending queue of the Web application.

(b) Using an error page created by the user

The displayed error page can be customized to a user-created error page. However, whether customization is possible depends on the method of locking the service. The following table indicates the method of locking the service and support for error page customization:

Table 5‒18: Method of locking the service and error page customization

Method of locking the service

Customizing the error page

Changing the distribution destination of requests in the load balancer

Y

Stopping the load balancer

--

Stopping the Web server

--

Stopping the J2EE server

Y#

Stopping the application

Y#

Legend:

Y: Yes

--: No

#

In the Web server settings for customizing error page, 302 error is returned when full URL (a URL starting with http:// and specifying the contents of another site) is specified in the ErrorDocument directive of the httpsd.conf file.

For details about the settings for error page customization, see the manual HTTP Server. The error page can be customized only if an HTTP server is used as the web server.

(4) Releasing the service lock

The releasing of the service locks in Web applications differs depending upon the method of locking the service. The methods for releasing service locks are described below for each service locking method: