users@glassfish.java.net

Re: GlassFish 3 Cluster and EJB Timer

From: <glassfish_at_javadesktop.org>
Date: Sat, 25 Jul 2009 04:35:42 PDT

.. maybe the questions are too early to be answered!?

In a GlassFish 2.1 cluster timer creation is unique across the cluster. firing will happen in the bean on the server instance it was created. So if you have multiple server instances and you call the bean method which creates the timer on each server instance, you will get multiple timers for a bean component.

I am not sure if this is still the case with EJB 3.1 and GlassFish 3. The @Schedule annotation ensures automatic timer creation. If you have two server instances, will the timer be created on each instance or only on one instance? So if I would invoke timerService.getTimers().size() will I get 1 or 2 as result?
[Message sent by forum member 'doug_hansen' (doug_hansen)]

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