users@glassfish.java.net

timer jobs

From: Glenn Holmer <gholmer_at_weycogroup.com>
Date: Mon, 18 Jul 2011 16:08:08 -0500

We've started receiving the dreaded "OutOfMemoryError: unable to create
new native thread" on a @Schedule job. Aside from the obvious need to
find and fix that, our immediate concern is that @Schedule jobs appear
to get backed up when this happens, and do not resume even after
GlassFish is restarted.

I checked this URL:

http://localhost:8080/ejb-timer-service-app/timer

on several machines running the same app, and on one that hasn't had
this problem, we see what we would expect: "There are 8 active
persistent timers on this container" (there are 8 @Schedule annotations
in our code). On two machines that have experienced this problem, we see
numbers of 35 and 31.

I have two questions:

1) How do we purge those "stuck" timer jobs?
2) What happens if I use "persistent=false" in the @Schedule annotation?
Will they still run if the server is restarted, or only on a deploy?

-- 
____________________________________________________________
Glenn Holmer                          gholmer_at_weycogroup.com
Software Engineer                        phone: 414-908-1809
Weyco Group, Inc.                          fax: 414-908-1601