--- quartz-2.1.0-org/quartz/src/main/java/org/quartz/impl/StdSchedulerFactory.java      2011-09-16 23:20:29.000000000 +0200
+++ quartz-2.1.0/quartz/src/main/java/org/quartz/impl/StdSchedulerFactory.java  2011-10-10 14:45:11.000000000 +0200
@@ -1245,6 +1245,7 @@
             threadExecutor.initialize();
 
             rsrcs.setThreadPool(tp);
+            tp.setThreadExecutor(threadExecutor);
             if(tp instanceof SimpleThreadPool) {
                 ((SimpleThreadPool)tp).setThreadNamePrefix(schedName + "_Worker");
                 if(threadsInheritInitalizersClassLoader)
--- quartz-2.1.0-org/quartz/src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessorPlugin.java  2011-09-16 23:20:29.000000000 +0200
+++ quartz-2.1.0/quartz/src/main/java/org/quartz/plugins/xml/XMLSchedulingDataProcessorPlugin.java      2011-10-10 15:32:57.000000000 +0200
@@ -17,6 +17,11 @@
 
 package org.quartz.plugins.xml;
 
+
+import static org.quartz.JobBuilder.newJob;
+import static org.quartz.SimpleScheduleBuilder.simpleSchedule;
+import static org.quartz.TriggerBuilder.newTrigger;
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -24,7 +29,6 @@
 import java.io.UnsupportedEncodingException;
 import java.net.URL;
 import java.net.URLDecoder;
-import java.util.Date;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -34,12 +38,11 @@
 
 import javax.transaction.UserTransaction;
 
+import org.quartz.JobDetail;
 import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
-import org.quartz.SimpleTrigger;
+import org.quartz.Trigger;
 import org.quartz.TriggerKey;
-import org.quartz.impl.JobDetailImpl;
-import org.quartz.impl.triggers.SimpleTriggerImpl;
 import org.quartz.jobs.FileScanJob;
 import org.quartz.jobs.FileScanListener;
 import org.quartz.plugins.SchedulerPluginWithUserTransactionSupport;
@@ -231,21 +233,17 @@
                         // remove pre-existing job/trigger, if any
                         getScheduler().unscheduleJob(tKey);
                         
-                        // TODO: convert to use builder
-                        SimpleTriggerImpl trig = (SimpleTriggerImpl) getScheduler().getTrigger(tKey);
-                        trig = new SimpleTriggerImpl();
-                        trig.setName(jobTriggerName);
-                        trig.setGroup(JOB_INITIALIZATION_PLUGIN_NAME);
-                        trig.setStartTime(new Date());
-                        trig.setEndTime(null);
-                        trig.setRepeatCount(SimpleTrigger.REPEAT_INDEFINITELY);
-                        trig.setRepeatInterval(scanInterval);
-                        
-                        // TODO: convert to use builder
-                        JobDetailImpl job = new JobDetailImpl(
-                                jobTriggerName, 
-                                JOB_INITIALIZATION_PLUGIN_NAME,
-                                FileScanJob.class);
+                        Trigger trig = newTrigger()
+                               .withIdentity(tKey)
+                               .withSchedule(simpleSchedule()
+                                               .withIntervalInMilliseconds(scanInterval)
+                                               .repeatForever()
+                                               )
+                               .build();
+                        
+                        JobDetail job = newJob(FileScanJob.class)
+                               .withIdentity(jobTriggerName+"Job", JOB_INITIALIZATION_PLUGIN_NAME)
+                               .build();
                         job.getJobDataMap().put(FileScanJob.FILE_NAME, jobFile.getFileName());
                         job.getJobDataMap().put(FileScanJob.FILE_SCAN_LISTENER_NAME, JOB_INITIALIZATION_PLUGIN_NAME + '_' + getName());
                         
--- quartz-2.1.0-org/quartz/src/main/java/org/quartz/simpl/SimpleThreadPool.java        2011-09-16 23:20:28.000000000 +0200
+++ quartz-2.1.0/quartz/src/main/java/org/quartz/simpl/SimpleThreadPool.java    2011-10-10 14:49:48.000000000 +0200
@@ -20,6 +20,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.quartz.SchedulerConfigException;
+import org.quartz.spi.ThreadExecutor;
 import org.quartz.spi.ThreadPool;
 
 import java.util.Iterator;
@@ -56,6 +57,8 @@
      * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      */
 
+       private ThreadExecutor executor;
+       
     private int count = -1;
 
     private int prio = Thread.NORM_PRIORITY;
@@ -277,7 +280,7 @@
         Iterator<WorkerThread> workerThreads = createWorkerThreads(count).iterator();
         while(workerThreads.hasNext()) {
             WorkerThread wt = workerThreads.next();
-            wt.start();
+            executor.execute(wt);
             availWorkers.add(wt);
         }
     }
@@ -421,7 +424,7 @@
                         "WorkerThread-LastJob", prio, isMakeThreadsDaemons(), runnable);
                 busyWorkers.add(wt);
                 workers.add(wt);
-                wt.start();
+                executor.execute(wt);
             }
             nextRunnableLock.notifyAll();
             handoffPending = false;
@@ -599,4 +602,8 @@
             }
         }
     }
+
+       public void setThreadExecutor(ThreadExecutor executor) {
+               this.executor = executor;
+       }
 }
--- quartz-2.1.0-org/quartz/src/main/java/org/quartz/simpl/ZeroSizeThreadPool.java      2011-09-16 23:20:28.000000000 +0200
+++ quartz-2.1.0/quartz/src/main/java/org/quartz/simpl/ZeroSizeThreadPool.java  2011-10-10 14:26:23.000000000 +0200
@@ -20,6 +20,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.quartz.SchedulerConfigException;
+import org.quartz.spi.ThreadExecutor;
 import org.quartz.spi.ThreadPool;
 
 /**
@@ -111,4 +112,7 @@
     public void setInstanceName(String schedName) {
     }
 
+       public void setThreadExecutor(ThreadExecutor executor) {                
+       }
+
 }
--- quartz-2.1.0-org/quartz/src/main/java/org/quartz/spi/ThreadPool.java        2011-09-16 23:20:28.000000000 +0200
+++ quartz-2.1.0/quartz/src/main/java/org/quartz/spi/ThreadPool.java    2011-10-10 14:23:22.000000000 +0200
@@ -121,4 +121,9 @@
      */
     void setInstanceName(String schedName);
 
+    /**
+     * <p>Pass the thread executor to the <code>ThreadPool</code>.</p>
+     * @param executor
+     */
+    void setThreadExecutor(ThreadExecutor executor);
 }
