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>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s