本文整理汇总了Java中javax.batch.operations.JobExecutionNotRunningException类的典型用法代码示例。如果您正苦于以下问题:Java JobExecutionNotRunningException类的具体用法?Java JobExecutionNotRunningException怎么用?Java JobExecutionNotRunningException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JobExecutionNotRunningException类属于javax.batch.operations包,在下文中一共展示了JobExecutionNotRunningException类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: stopJobAndWaitForResult
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
public JobExecution stopJobAndWaitForResult(JobExecution jobExecution) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException, JobExecutionTimeoutException {
JobExecution terminatedJobExecution = null;
jobOp.stop(jobExecution.getExecutionId());
JobExecutionWaiter waiter = waiterFactory.createWaiter(jobExecution.getExecutionId(), jobOp, sleepTime);
try {
terminatedJobExecution = waiter.awaitTermination();
} catch (JobExecutionTimeoutException e) {
logger.severe(TIMEOUT_MSG);
Reporter.log(TIMEOUT_MSG);
throw e;
}
return new TCKJobExecutionWrapper(terminatedJobExecution, jobOp);
}
示例2: batchStop
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
private void batchStop(String batchId, HttpServletRequest req, HttpServletResponse resp) {
Long executionId = extractExecutionId(batchId, resp);
if (executionId == null) {
return;
}
try {
jobOperator.stop(executionId);
reportSuccess(executionId, resp, BatchStatus.STOPPING.toString());
} catch (NoSuchJobExecutionException noSuchJob) {
reportFailure(executionId, resp, "NoSuchJob");
} catch (JobExecutionNotRunningException notRunningException) {
reportFailure(executionId, resp, "JobExecutionNotRunning");
} catch (Exception generalException) {
StringBuilder msg = new StringBuilder("Failure in BatchExecution");
appendExceptionMsg(msg, generalException);
reportFailure(executionId, resp, msg.toString());
}
}
示例3: stop
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
@Override
public void stop(long executionId) throws NoSuchJobExecutionException,
JobExecutionNotRunningException, JobSecurityException {
logger.entering(sourceClass, "stop", executionId);
if (isAuthorized(persistenceService.getJobInstanceIdByExecutionId(executionId))) {
batchKernel.stopJob(executionId);
} else {
throw new JobSecurityException("The current user is not authorized to perform this operation");
}
logger.exiting(sourceClass, "stop");
}
示例4: stopJob
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
@Override
public void stopJob(long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException {
IThreadRootController controller = this.executionId2jobControllerMap.get(executionId);
if (controller == null) {
String msg = "JobExecution with execution id of " + executionId + "is not running.";
logger.warning("stopJob(): " + msg);
throw new JobExecutionNotRunningException(msg);
}
controller.stop();
}
示例5: stopJob
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
@Override
public void stopJob(final long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException {
final ThreadRootController controller = this.executionId2jobControllerMap.get(executionId);
if (controller == null) {
throw new JobExecutionNotRunningException("JobExecution with execution id of " + executionId + "is not running.");
}
controller.stop();
}
示例6: stopJobWithoutWaitingForResult
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
public void stopJobWithoutWaitingForResult(long jobInstanceId) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException {
jobOp.stop(jobInstanceId);
}
示例7: stop
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
@Override
public void stop(final long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException {
kernelService.stopJob(executionId);
}
示例8: stop
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
@Override
public void stop(final long id) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException {
getOrCreateDelegate().stop(id);
waitEnd(id);
}
示例9: stopJob
import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
void stopJob(long executionID) throws NoSuchJobExecutionException, JobExecutionNotRunningException;