users@glassfish.java.net

Re: How to stop EJB timers being deleted upon app undeployment

From: <glassfish_at_javadesktop.org>
Date: Fri, 12 Sep 2008 12:28:26 PDT

Yes, correct - I use a simple query like that and it will scale massively. The timer thread periodically calls timerBean.fireTimers() which has a maxTimers property to control the maximum size of the transaction - I'll fire 10 timers per transaction as a first guess. fireTimers() then does a simple indexed retrieval and calls the appropriate handler methods which in turn can switch Subjects to work with JAAS, depending on whether it is a system or user timer. I have little doubt that this is more scalable and more manageable than EJB timers. My timer web service is switchable between the two types though, so I can easily try them both out and see what happens. I agree it should all happen in the EJB layer, but as you know the thread can't really be launched there, so apart from that one hiccup, it does indeed all happen in EJB land. Thanks for the very valuable input, it's good to toss these things around a bit once in a while.
[Message sent by forum member 'mrawl' (mrawl)]

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