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.