-
1. Re: EJB Timer with Seam: Is it really a bug?
kapitanpetko Jun 2, 2009 4:08 AM (in response to israel.bgf)I don't think that this could be addressed in Seam. EJB timers know nothing about Seam,
so there is no easy way to stop them from executing before Seam is initialized.
You could check if Seam is initialized in your timer methods and do nothing if it is not,
but that way you miss one execution, depending on your schedule, that may or may not be a problem.If you use Quartz you could pause the scheduler on startup or delay its initialization,
but timing will be tricky. Since the timer service is part of J2EE, there is no way to
control it from your application (at least none that I know of).HTH
-
2. Re: EJB Timer with Seam: Is it really a bug?
israel.bgf Jun 2, 2009 3:48 PM (in response to israel.bgf)What you say is true, but theorically seam should be EJB friendly in every way, even for the not-so-used EJB Timers. :)
I didnt test-it but, Jboss have JSF libs, so it get started as soon the server starts, could it works with seam-libs too?
-
3. Re: EJB Timer with Seam: Is it really a bug?
kapitanpetko Jun 3, 2009 3:51 AM (in response to israel.bgf)
Israel Fonseca wrote on Jun 02, 2009 15:48:
What you say is true, but theorically seam should be EJB friendly in every way, even for the not-so-used EJB Timers. :)Sure. File a JIRA, see what happens. Maybe there are ways to handle this in Seam core.
I didnt test-it but, Jboss have JSF libs, so it get started as soon the server starts, could it works with seam-libs too?Seam gets started by a context listener, so it will 'boot' after
your application starts. The timer service, however, is started by the container and will start before your Seam
app. There is no easy way around it. Unless you hooked into the timer service and start it from your Seam app (it's an
MBean, I think, so should be doable). If you try it, be sure to post your code. -
4. Re: EJB Timer with Seam: Is it really a bug?
israel.bgf Jun 3, 2009 3:28 PM (in response to israel.bgf)Well, it's
JIRAed
:https://jira.jboss.org/jira/browse/JBSEAM-4216
Unfortunately i dont have time now to check the fix as you sugested. But thks Nikolay.
Israel