EJB Container Lazy Deserialization Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

During Zero Downtime Patching in application server environments, lazy deserialization exceptions occur when stateful EJBs' states are replicated from patched to unpatched servers or vice versa, leading to deserialization failures due to incompatible Java serialization changes, resulting in potential session loss and downtime.

Innovation Solution

The system detects such instances and replicates the bean state to a new secondary server in the opposite failover server group, setting a remote reference exception that carries the replica's remote reference to the client side, enabling lazy deserialization to fulfill client requests.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of time

If stateful EJB state is replicated from patched server to unpatched server during Zero Downtime Patching, then patching can proceed with minimal downtime, but deserialization failures occur due to incompatible Java serialization changes

Engineering Contradiction:
ImprovedowntimeVSAvoiddeserialization success
Core Design Contradiction:
Loss of timeVSReliability

Solution Approach 1:

The system performs preliminary actions by detecting deserialization incompatibility before it causes failure. The container checks whether the current server can deserialize the replicated state, and if not, proactively redirects the client request to an appropriate server that can handle the deserialization, preventing the failure before it occurs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The EJB container acts as an intermediary between the client and the server. When deserialization incompatibility is detected, the container intercepts the client request and redirects it to a suitable server (either the original primary or an alternative), mediating the interaction to ensure successful deserialization while maintaining the illusion of continuous service for the client.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If lazy deserialization is used to delay deserialization until client request, then server can proceed with patching, but deserialization exceptions occur when incompatible state is accessed

Engineering Contradiction:
Improvepatching speedVSAvoidsession integrity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements self-service by enabling the client stub to automatically detect and handle deserialization exceptions. When a deserialization exception occurs, the stub autonomously redirects the request to an appropriate server without requiring manual intervention, allowing the patching process to continue while maintaining session integrity.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system uses feedback mechanisms where deserialization exceptions serve as signals that trigger automatic redirection. The exception feedback from the deserialization process informs the client stub that the current server cannot handle the state, prompting the stub to seek an alternative server that can successfully deserialize the state.

Inventive Principle:
Principle #23Feedback

3Productivity

If deserialization is attempted on server with incompatible patch level, then patching can proceed, but session loss occurs due to deserialization failure

Engineering Contradiction:
Improvepatching continuityVSAvoidsession data
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The system performs preliminary detection of deserialization compatibility before session data is lost. The container checks whether the server can deserialize the replicated state, and if not, proactively redirects the client request to an appropriate server, preventing session data loss before it occurs.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system provides beforehand cushioning by having the client stub ready with redirection logic to handle deserialization failures. This preparatory measure ensures that if deserialization fails on one server, the client can immediately be redirected to an alternative server, cushioning against potential session data loss.

Inventive Principle:
Principle #11Beforehand cushioning (Prior cushioning)

Data Source

PatentUS10310841B2System and method for handling lazy deserialization exceptions in an application server environment
Publication Date: 2019.06.04 ORACLE INT CORP
  • US10310841B2 patent drawing
  • US10310841B2 patent drawing
  • US10310841B2 patent drawing

AI summary

In accordance with an embodiment, described herein is a system and method for handling lazy deserialization exceptions in an application server environment. When a stateful, e.g., EJB client request arrives to the EJB container, if the container detects that it cannot deserialize the state on this server and a patching (Patching, Zero Downtime Patching, ZDT) application upgrade rollout is in progress, the container can ask the replication manager to replicate the bean state to a new secondary that is in the opposite ZDT failover server group of this server, if it can find one. A remote reference of the replica on the new secondary will be set to a special type exception, which carries the replica's remote reference to the client side, in order to fulfill the client request.