diff -w -c -r -N jgs-struts-0.2-dev/src/java/com/jgsullivan/struts/plugins/QuartzPlugIn.java jgs-struts-0.2-dev.new/src/java/com/jgsullivan/struts/plugins/QuartzPlugIn.java
*** jgs-struts-0.2-dev/src/java/com/jgsullivan/struts/plugins/QuartzPlugIn.java	2003-08-04 10:09:53.000000000 -0400
--- jgs-struts-0.2-dev.new/src/java/com/jgsullivan/struts/plugins/QuartzPlugIn.java	2003-11-25 00:05:19.000000000 -0500
***************
*** 96,101 ****
--- 96,104 ----
  	    SchedulerBuilder builder = new SchedulerBuilder();
  	    Scheduler scheduler =
  		builder.buildScheduler(getConfigURL().openStream());
+ 	    // expose the ActionServlet in the scheduler context so that it
+ 	    // is available to any jobs
+ 	    scheduler.getContext().put(getKey(), servlet);
  
  	    scheduler.start();
  	}
***************
*** 105,110 ****
--- 108,128 ----
  	}
      }
  
+     public void destroy() {
+ 	log.info("Destroying QuartzPlugIn");
+ 
+ 	if (this.scheduler != null) {
+ 	    try {
+ 		scheduler.shutdown();
+ 		this.scheduler = null;
+ 	    }
+ 	    catch (Exception ex) {
+ 		// silently ignore it
+ 	    }
+ 	}
+ 	super.destroy();
+     }
+ 
      /**
       * Returns the key for this plugin. If the key is not defined, returns
       * the default key.
