|
From: Kopylenko, D. <dko...@ac...> - 2003-09-24 14:51:25
|
Perhaps SpringSchedulerHelper should not implement Scheduler, but use = it as underlying strategy ? Regards, Dmitriy. -----Original Message----- From: Ivan Ristic [mailto:iv...@we...]=20 Sent: Wednesday, September 24, 2003 10:28 AM To: "j=FCrgen h=F6ller [werk3AT]" Cc: Kopylenko, Dmitry; al...@jt...; Colin Sampaleanu; spr...@li... Subject: Re: [Springframework-developer] Spring scheduler? j=FCrgen h=F6ller [werk3AT] wrote: > On related terms, I'll work on J2EE integration for SBB's UC4 > job scheduling system in October. There is definitely a lot of > overlap here, and the big plus that SBB have agreed to define common=20 > parts and interfaces as open source project a la AOP Alliance. = Generic=20 > interfaces and definitions for implementing jobs, and implementations = > for UC4 via JCA/JMS and for Spring in a bean factory style... sounds=20 > interesting to me :-) Additionally, SBB have good relations with SAP=20 > and the makers of Flux, so there should be plenty of feedback and=20 > chances for future developments. That's very good news. As far as I am concerned we can wait for that, especially since I moved my scheduler-related project for early next year. However, I did put some work toward this since our last email exchange and would like to proceed (slowly, as you can see) with it: I have reviewed Quartz and, now that I've invested time to learn how it works, I have no real desire to create a new scheduling library. I still find it too complex, though, but nothing is perfect. Therefore I am proposing what someone else proposed before, to create a simple Quartz wrapper. I also looked at the J2EE timer service and found it too simplistic. There is an interesting article on the subject: =20 http://www2.theserverside.com/resources/article.jsp?l=3DMonsonHaefel-Col= umn4 I've tried to create a very simple (as simple as it can be) = scheduling wrapper and this is what I've come up with: ------------------------- public interface Scheduler { // schedule is cron-like scheduling formula public int createTask(String schedule, Runnable runnable); public boolean removeTask(int taskid); } public class SpringSchedulerHelper implements Scheduler { public int createTask(String schedule, String bean); public int createTask(String schedule, String bean, String = method); public int createTask(String schedule, String bean, String method, = String[] args); // these two are not specific to Spring, actually=09 public int createTask(String schedule, Object instance, Method m); public int createTask(String schedule, Object instance, Method m,=20 Object[] args); =09 public int createTask(String schedule, ApplicationEvent event); // perhaps more createTask methods here // scheduler implementation set at runtime public void setScheduler(Scheduler scheduler); public void getScheduler(); } public class SpringTaskWrapper implements Runnable { // todo ... } --=20 ModSecurity (http://www.modsecurity.org) [ Open source IDS for Web applications ] |