EJB Timer Service Retry and Concurrency Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current timer service systems lack mechanisms for retrying failed timeout events and fail to adequately control concurrent access to timers in multi-threaded environments, leading to potential mal-operation and failures.

Innovation Solution

A container-provided EJB timer service that allows for scheduled notifications, retry of failed timeout events, and concurrency control to manage access from multiple threads and transactions, ensuring reliable and transactional notification services for timed events.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If timer service systems provide basic timeout notification functionality, then simple timed events can be handled, but failed timeout events cannot be retried and concurrent access from multiple threads causes mal-operation

Engineering Contradiction:
Improvetimeout notification reliabilityVSAvoidtimer service mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The timer service is segmented into distinct functional components: a timer creation mechanism, a separate retry management subsystem, and a concurrency control layer. Each component handles specific aspects independently, allowing failed timeouts to be retried without affecting other timer operations, thus improving reliability while managing complexity through modular design

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

An intermediary retry management layer is introduced between the timer expiration event and the business logic execution. This intermediary captures failed timeout events, manages retry attempts, and coordinates concurrent access requests, preventing direct conflicts while ensuring reliable notification delivery through multiple retry attempts

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If retry mechanism is added to handle failed timeout events, then timeout failure impact is minimized, but timer service complexity increases

Engineering Contradiction:
Improvetimeout event handling reliabilityVSAvoidtimer service structure complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The retry mechanism is configured in advance with predetermined retry counts and intervals. When a timeout event fails, the system automatically executes the pre-configured retry actions without requiring complex real-time decision logic, thereby improving reliability while keeping the added complexity manageable through预先配置

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A feedback loop is established where the timer service monitors the success or failure of timeout notifications and automatically triggers retry attempts based on the outcome. This feedback-driven approach ensures reliable event handling while maintaining controlled complexity through automated response to failure conditions

Inventive Principle:
Principle #23Feedback

3Reliability

If concurrency control is implemented to manage multi-threaded access, then timer mal-operation is prevented, but system complexity increases

Engineering Contradiction:
Improvetimer operation stabilityVSAvoidaccess control mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The concurrency control mechanism creates an equipotential access state where all thread requests are treated equally through a standardized synchronization protocol. Threads wait their turn to access the timer service under uniform conditions, preventing mal-operation from race conditions while maintaining relatively simple control logic through equal treatment of all access requests

Inventive Principle:
Principle #12Equipotentiality

Data Source

PatentUS7702957B2Systems and methods for timer service
Publication Date: 2010.04.20 ORACLE INT CORP
  • US7702957B2 patent drawing
  • US7702957B2 patent drawing
  • US7702957B2 patent drawing

AI summary

The present invention supports container-provided EJB timer service that allows EJB instances dealing with timed events to create and register for a timer, which is scheduled to send notifications either at a specific time and/or after a specific elapsed duration, or at specific recurring intervals. When the timer expires, certain business logic inside the EJB instance will be invoked to handle the timeout event. When the cancel method of a timer is called, the timer may cease to exist. The timer is capable of retrying failed timeout under certain conditions when the current invocation of timeout logic fails. In addition, the timer is capable of monitoring the access from multiple registered EJB instances enrolled in transactions under multi-threaded environment, and restricting the access to the timer from EJB instances in certain threads until the current transaction accessing the timer commits to prevent a potential conflicting situation. This description is not intended to be a complete description of, or limit the scope of, the invention. Other features, aspects, and objects of the invention can be obtained from a review of the specification, the figures, and the claims.