News: Glassfish + Quartz integration
Finally i have implemented a way to schedule quartz jobs from EJBs in Glassfish. I used the RMI approach. I have tested it and works like a charm now. Any comments about this solution and possible drawbacks are appreciated. Go to the article here: English: http://www.ibstaff.net/fmartinez/?p=57 Spanish: http://www.frankdavidmartinez.com/2009/03/glassfish-quartz-ejb/
- Posted by: Frank Martinez
- Posted on: March 10 2009 07:50 EDT
- Re: Glassfish + Quartz integration by Andy Leung on March 10 2009 09:16 EDT
- Re: Glassfish + Quartz integration by arjan t on March 10 2009 13:54 EDT
- Re: Glassfish + Quartz integration by Maurizio Turatti on March 10 2009 22:18 EDT
- cool! by Svante Kumlien on March 11 2009 07:39 EDT
While this is a great for learning, does it have any RMI call overhead? Besides, the callback handling from scheduler could be lost, couldn't it?
Hi Andy, There is some RMI overhead calling the scheduler when you post the job for scheduling but, I use a JMS Callback to a Message Driven Bean for the job execution. This way i maintain all my business code clean of quartz api deps, i do that using org.quartz.jobs.ee.jms.SendQueueMessageJob. JMS can provide reliable callback guarantee.
It might me nice to contrast this approach with the approach taken to execute Quartz jobs from EJBs in Jboss AS. Basically there are two ways to do this; either start up the Quartz scheduler in a web module, or use the JMX bean that is provided with Quartz 1.6 and higher. This article has a nice explanation of using Quartz in Java EE (for Jboss): http://www.mastertheboss.com/en/jboss-server/84-jboss-quartz.html
Another interesting possibility is to use the SchedulerBC for Glassfish ESB: http://wiki.open-esb.java.net/Wiki.jsp?page=SchedulerBC Regards
Does it support clustering (trigger fires only on one server) and server restart? We wrote something similar for a WebLogic cluster with an Oracle db using quartz like API but using the real stuff would be great!
Hi Svante, Quartz support clustering out of the box: http://www.opensymphony.com/quartz/wikidocs/ConfigJDBCJobStoreClustering.html