users@glassfish.java.net

Initiating a scheduler within an EJB

From: <glassfish_at_javadesktop.org>
Date: Tue, 10 Jul 2007 13:28:18 PDT

hello,

I want to use an external scheduler since the EJB Timers do not provide the functionality I need,

I tried to use Quartz but I have few problems and I hope someone can give me a direction how to solve them:

1) When the scheduler starts it never stops, is there a way to call a method asynchrony (without waiting for its process to finish) through EJB? I know this is possible through an MDB but it's overhead for this purpose since there is usually only one Scheduler object.
Since EJBS has no sort of 'StartUp' method, I thought about creating a servlet for that(or there is a better way?), but the question regarding how to invoke the EJB method asynchrony remains.
2) The scheduler is very simple, when there is a trigger, it execute a method over the relevant job.
The jobs are simple java classes that implements some interface,
Is it possible through job execution method to call EJBs locally? assuming that the scheduler being initiated within the application server container through a certain EJB as described in q 1?


regarding question 1, I know that Quartz can live as a ManagedBean within the app server, but it is only supported for Jboss/WebSphere


Many thanks,

Demian.
[Message sent by forum member 'demiant' (demiant)]

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