[jboss-user] [JCA/JBoss] - Re: Controlling the quartz scheduler from EJB with the quart
do-not-reply at jboss.com
Fri Jul 11 17:39:52 EDT 2008
"vickyk" wrote : "henk53" wrote :
| | If I needed such kinds of interactions from my code to quartz from within an EJB bean, how would I go about doing that using the quartz RA?
| Have you tried using the JobExecutionContext to get the Schedule etc ... , I can see that it would be possible from the API
That would indeed perhaps be an option if the job that was triggered by Quartz needed to programmatically schedule a new job. In my case however I need access to the scheduler to programmatically create a trigger and a job before any job has actually executed yet.
My scenario is basically that a message arrives in a MDB and based on the content of that message a decision is made to schedule a job to run at e.g. a specific time. Therefor neither static annotations nor the context given to a job when it starts executing is really helpful.
Some other option I thought about was letting quartz run in it's own web app within the same AS and letting it put a reference to the scheduler in JNDI when it starts up. That wise jobs will be triggered in the web app context and invoke EJB3 code in the EJB3 container. EJB3 code on its turn picks up the reference to the scheduler via JNDI and would use it to schedule new jobs dynamically.
I wonder however whether there is some mechanism being provided by the quartz resource adapter for this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163973#4163973
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163973
More information about the jboss-user