Women in Technology

Hear us Roar

  Scheduling Jobs in a Java Web Application
Subject:   Article's code?
Date:   2006-04-20 05:26:53
From:   chrislhardin
Response to: Article's code?

You only need to implement PlugIn and two methods, destroy and init.

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() {



Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • 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 to
    SchedulerPlugIn.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).