users@glassfish.java.net

Re: JEE Timer Service runs twice on error.

From: <glassfish_at_javadesktop.org>
Date: Tue, 29 May 2007 19:31:22 PDT

Yes. This is by design.

Infact, the EJB specification requires that the container retries the timeout method if the Tx rollsback. Since throwing a NullPointerException causes the Tx to rollback, our container retries.

Infact, Glassfish can be configured to retry the timeout to certain value by changing the value of <max-redeliveriesl> in domain.xml.


If you don't want the timer to be re-deliverd, you should cancel the Timer and complete the ejbTimeout() method notmally.
[Message sent by forum member 'mk111283' (mk111283)]

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