uCosminexus Application Server, Expansion Guide
This subsection describes the following items related to the HTTP session attributes that can be inherited when a failure occurs.
In the session failover functionality, serialization of objects occurs in update processing of the global session information and deserialization of objects occurs in inherit processing. Hence, attributes to be registered in an HTTP session must satisfy the following condition:
With the session failover functionality, the following objects of serializable classes are supported as targets for inheriting:
However, with inheritance processing, it is not checked whether an object of a serializable class, which is registered in an HTTP session, is supported by the session failover functionality.
The following table describes whether you can or cannot inherit the session information depending on the contents of objects registered in an HTTP session.
Table 5-3 Conditions for inheriting the session information depending on the contents of objects registered in an HTTP session
| No. | Contents of objects registered in an HTTP session | Can or cannot inherit the session information | Storing global session information | |
|---|---|---|---|---|
| Implementation status of the java.io.Serializable interface | Serialization successful/failed | |||
| 1 | The java.io.Serializable interface implemented | Serialization successful | Can be inherited. | Information after serialization is stored in a database or on an EADs server. |
| 2 | Serialization failed | Cannot be inherited because HTTP sessions containing attributes, which failed in serialization, are not targeted for inheriting a global session. | The KDJE34318-E or KDJE34411-E message is output and the global session information is not stored in a database or an EADs server. After completing request processing the next time, the global session information is stored in a database or on an EADs server when objects registered in an HTTP session become serializable. |
|
| 3 | The java.io.Serializable interface not implemented | (Cannot be serialized) | Cannot be inherited because attributes that cannot be serialized cannot be targeted for inheriting the global session. | If there are objects that cannot be serialized, the KDJE34317-W or KDJE34410-W message is output and the global session information that is created with the attributes excluding attributes that cannot be serialized, is stored in a database or on an EADs server. |
Notes on serialize processing are as follows:
The serialize processing is executed not only for the objects targeted for inheriting but also for all the objects that are referenced from the objects targeted for inheriting. Hence, if you register a class containing information, which need not be inherited, in an HTTP session, performance might deteriorate.
In the serialize processing, data after serialization is temporarily created exceeding the number of HttpSession objects set in the application. As a result, if you register huge objects in an HTTP session, the java.lang.OutOfMemoryError error might occur while creating the global session information.
In the following cases, the KDJE34317-W, KDJE34318-E, KDJE34410-W, or KDJE34411-E message is output and serialization fails.
If serialization fails, processing for updating and inheriting the global session information is not executed. To execute the processing, you must take one of the following actions:
Deserialization fails in the following cases:
If deserialization of session information fails when receiving a request or in the processing of inheriting global session information when starting a Web application, global session information and session information is deleted, and KDJE34326-E or KDJE34413-E is output. Because inheriting of the session fails, the request is processed in the absence of an HTTP session.
All Rights Reserved. Copyright (C) 2013, 2015, Hitachi, Ltd.