users@glassfish.java.net

Re: How to initialize EJB Timers cleanly in a cluster ?

From: <glassfish_at_javadesktop.org>
Date: Fri, 20 Feb 2009 13:39:53 PST

Yes, each call to createTimer results in a new persistent timer. If the application wants to create
only a single timer for the entire cluster that would need to be enforced at the application level.

EJB 3.1 will add automatic timers that are created by the container as a result of deployment.
That will solve this particular problem since in the cluster case it will be the responsibility of
the container to ensure that each automatic timer is created once per cluster.

EJB 3.1 will also define non-persistent timers. Those are timers whose lifetime is scoped only
to the server instance in which they are created and disappear when the server instance shuts
down.
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=333192