1 2 18 19 22 package org.quartz.ee.jta; 23 24 import org.quartz.Scheduler; 25 import org.quartz.SchedulerConfigException; 26 import org.quartz.core.JobRunShell; 27 import org.quartz.core.JobRunShellFactory; 28 import org.quartz.core.SchedulingContext; 29 30 44 public class JTAJobRunShellFactory implements JobRunShellFactory { 45 46 53 54 private Scheduler scheduler; 55 56 private SchedulingContext schedCtxt; 57 58 65 66 public JTAJobRunShellFactory() { 67 } 68 69 76 77 86 public void initialize(Scheduler scheduler, SchedulingContext schedCtxt) 87 throws SchedulerConfigException { 88 this.scheduler = scheduler; 89 this.schedCtxt = schedCtxt; 90 } 91 92 99 public JobRunShell borrowJobRunShell() { 100 return new JTAJobRunShell(this, scheduler, schedCtxt); 101 } 102 103 110 public void returnJobRunShell(JobRunShell jobRunShell) { 111 jobRunShell.passivate(); 112 } 113 114 } | Popular Tags |