Glassfish 4.0.1 Expunge Timer

Glassfish seems to expunge timers when the timer generates an application exception. I’m not sure if this should be the default behavior for a timer or not. A quick Google Search seems to indicate that other Java EE containers do reschedule.

I do hope the folks who oversee the EJB Specification to make a call on this item. My personal preference would be for the timer to be rescheduled if it fails. But, I can see why one would want the opposite behavior as well. Maybe a solution would be to leave the default behavior up to the container vendor but put a paramater in the @Schedule decoration to tell the container how to behave.

Until the issue is decided there is a work around on Glassfish to change this expunging behavior. Edit the domain.xml file and add:


            <ejb-container session-store="${com.sun.aas.instanceRoot}/session-store">
                     <property name="reschedule-failed-timer" value="true"></property>