use of cn.cerc.jbean.rds.StubHandle in project summer-mis by cn-cerc.
the class ProcessService method run.
// 循环反复执行
@Override
public void run() {
Calendar c = Calendar.getInstance();
if (!isRunning) {
isRunning = true;
if (C_SCHEDULE_HOUR == c.get(Calendar.HOUR_OF_DAY)) {
try {
report();
} catch (Exception e) {
e.printStackTrace();
}
} else if (ServerConfig.enableTaskService()) {
try {
StubHandle handle = new StubHandle();
runTask(handle);
} catch (Exception e) {
e.printStackTrace();
}
}
isRunning = false;
} else {
context.log("上一次任务执行还未结束");
}
}
use of cn.cerc.jbean.rds.StubHandle in project summer-mis by cn-cerc.
the class ProcessService method main.
// 手动执行所有的预约服务
public static void main(String[] args) {
StubHandle handle = new StubHandle();
ProcessService ps = new ProcessService();
ps.setHandle(handle);
ps.run();
}
use of cn.cerc.jbean.rds.StubHandle in project summer-mis by cn-cerc.
the class AsyncServiceTest method test_send_get.
@Test
@Ignore
public void test_send_get() {
StubHandle handle = new StubHandle();
AsyncService app = new AsyncService(handle);
app.setService("TAppCreditLine.calCusCreditLimit");
// app.setTimer(TDateTime.Now().getTime());
app.getDataIn().getHead().setField("UserCode_", handle.getUserCode());
app.setSubject("回算信用额度");
assertTrue("发送消息失败", app.exec());
}
Aggregations