Re: Startable with Schedulable
Stephen Davidson <[email protected]> Mon, 20 Sep 2004 16:40:17 -0500
| Newsgroups | gmane.comp.java.keel.user |
|---|---|
| Message-ID | <[email protected]> |
Nathan Kontny wrote: >I have a model that is Schedulable. And I get it all kicked off when I make a >request to it from a browser. In its execute mdethod I do a: > >Model scheduler = (Model) request > .getService(Model.ROLE, "quartzjobschedulemodel"); > >But I want to change this so that it kicks off automatically when the container >is started. I know that I can have me model implement Startable and that I can >specify in the meta-data activation="startup". > >But in my "start()" method, how do I get a handle to the quartzjobschedulemodel, >since there is not instance of a ModelRequest to getServices from? > >Thank you, >Nate >_______________________________________________ >User mailing list >[email protected] >http://lists.keelframework.org/listinfo.cgi/user-keelframework.org > > > Hi Nathan. Assuming that your model extends AbstractKeelServiceable; Object obj = (Model)super.getService(Model.ROLE, "quartzjobschedulemodel") Otherwise, I suggest you have a look at AbstractKeelServiceable, and see how it is doing what you need. Regards, Steve -- Java/J2EE Developer/Integrator Stephen Davidson and Associates, Inc. Chair, Dallas/FortWorth J2EE Sig 214-724-7741