Browse Prior Art Database

Distributed Timer Service in the J2EE 1.3 / J2EE 1.4 environment Disclosure Number: IPCOM000124108D
Original Publication Date: 2005-Apr-08
Included in the Prior Art Database: 2005-Apr-08
Document File: 5 page(s) / 270K

Publishing Venue



The Distributed Timer Service (DTS) is an enterprise application to be deployed in the ejb and web container of a single or cluster J2EE environment. It provides a way to register timers in order to run methods of EJBs or methods of generic java classes on the ejb or web container at the scheduled time. The DTS allows having a unique, distributed, redundant and reliable times synchronized on the database time (GMT).

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 5

Distributed Timer Service in the J2EE 1.3 / J2EE 1.4 environment

The Unified Modeling Language (UML) with use cases, analysis sequence diagrams make the description of the basic idea.

1. Use cases

2. Analysis sequence diagram: check the expired timers

This is the main flow where the TimerManager engine checks on the TimerRegistryTable for expired timer. If so, put a message in the queue of the messaging system and delete the timer of it has to be executed once. When the messaging system receives the message, it is delivered to the callback of the registered object (objName).


Page 2 of 5

Figure 3.

Check the expired timers

2. Deployment environment

The components of the DTS are deployed in a single or clustered environment as in Figure 2.



[This page contains 1 picture or other non-text object]

Page 3 of 5

Figure 2.

Cluster Environment

· TimerServlet: This class instantiantes in its init() startup method the ThreadTimerService .
· ThreadTimerService: This class is a thread, that sits in a loop where it repeatedly triggers a check for expired timer tasks and then goes to sleep for a dynamically adapted interval.
· TimerManagerBean: The TimerManagerBean is an EJB that checks for expired Timers and put the expired timers in the JSM Queue a TimerMessage containing the context to perfom the callbacks
· TimerMessageBean: This is MessageDrivenBean that receives the TimerMessage and invoke the registered callbacks of EJBs or Classes in the Web Container.

3. The TimerRegistryTable

In this table there are all timers registered.


[This page contains 1 picture or other non-text object]...