| Article: |
Scheduling Jobs in a Java Web Application | |
| Subject: | Article's code? | |
| Date: | 2006-04-19 16:36:58 | |
| From: | jorgesalido | |
|
I searched for the Article's full source code and could not find it anywhere... is it just me or it isn't available? It's not easy to follow the functionality of the suggested Struts plugin without the code for the SchedulerPlugin (whose init() method is its only code in the article).
|
||
Showing messages 1 through 2 of 2.
-
Article's code?
2006-04-20 05:26:53 chrislhardin [View]
-
Article's code?
2006-04-20 09:23:53 jorgesalido [View]
Thanks for the fast reply :)
My problem was not with implementing the interface per se, but with the missing variables that appeared on init, such as m_startOnLoad, m_startupDelayString and sm_scheduler, and the missing functionality, such as a call toSchedulerPlugIn.scheduleWork(scheduledJobDetail, trigger);
on page 2, which is also not on the article's code. Not that I find any of this hard to implement, it's just that I didn't want to miss any specifics on the subject (and that I have never previously implemented any Struts plugins).



import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.PlugIn;
import org.apache.struts.config.ModuleConfig;
public class ExamplePlugIn implements PlugIn {
/**
* @see org.apache.struts.action.PlugIn#init(org.apache.struts.action.ActionServlet,
* org.apache.struts.config.ModuleConfig)
*/
public void init(ActionServlet servlet, ModuleConfig config)
throws ServletException {
}
/**
* @see org.apache.struts.action.PlugIn#destroy()
*/
public void destroy() {
}
}