@IocBean
@DisallowConcurrentExecution
public class WirelessCallerServiceJob implements Job {
@Inject
protected Dao dao;
private static final Log log = Logs.get();
private static int runtimes=1;
private List wnwcList=new ArrayList();
public WirelessCallerServiceJob() {
wnwcList.add(new WindowNoWaitingCount(1,20));
}
@Override
public synchronized void execute(JobExecutionContext context) throws JobExecutionException {
try {
boolean isConnected = CallerUtil.connect(StaticCache.caller_port);
if (!isConnected) return;
for (WindowNoWaitingCount wnawc : wnwcList) handleRequest(wnawc);
} catch (Throwable th) {
log.error(th.getMessage());
} finally {
System.out.println("运行第" + runtimes++ + "次");
}
}
#==============================================================
#Configure Main Scheduler Properties
#==============================================================
org.quartz.scheduler.instanceName = defaultScheduler
org.quartz.scheduler.instanceId = AUTO
#==============================================================
#Configure JobStore isClustered=���ü�Ⱥģʽ
#==============================================================
org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
org.quartz.jobStore.dataSource=myDS
org.quartz.jobStore.tablePrefix = SYS_QRTZ_
org.quartz.jobStore.isClustered = true