当前位置: 首页>>代码示例>>Java>>正文


Java JobExecutionNotRunningException类代码示例

本文整理汇总了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);
}
 
开发者ID:WASdev,项目名称:standards.jsr352.tck,代码行数:18,代码来源:JobOperatorBridge.java

示例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());
    }
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:20,代码来源:SimpleRestController.java

示例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");
}
 
开发者ID:WASdev,项目名称:standards.jsr352.jbatch,代码行数:15,代码来源:JobOperatorImpl.java

示例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();
}
 
开发者ID:WASdev,项目名称:standards.jsr352.jbatch,代码行数:12,代码来源:BatchKernelImpl.java

示例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();
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:10,代码来源:DefaultBatchKernel.java

示例6: stopJobWithoutWaitingForResult

import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
public void stopJobWithoutWaitingForResult(long jobInstanceId) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException {
	jobOp.stop(jobInstanceId);
}
 
开发者ID:WASdev,项目名称:standards.jsr352.tck,代码行数:4,代码来源:JobOperatorBridge.java

示例7: stop

import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
@Override
public void stop(final long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException {
    kernelService.stopJob(executionId);
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:5,代码来源:JobOperatorImpl.java

示例8: stop

import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
@Override
public void stop(final long id) throws NoSuchJobExecutionException, JobExecutionNotRunningException, JobSecurityException {
    getOrCreateDelegate().stop(id);
    waitEnd(id);
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:6,代码来源:SynchronousJobOperator.java

示例9: stopJob

import javax.batch.operations.JobExecutionNotRunningException; //导入依赖的package包/类
void stopJob(long executionID) throws NoSuchJobExecutionException, JobExecutionNotRunningException; 
开发者ID:WASdev,项目名称:standards.jsr352.jbatch,代码行数:2,代码来源:IBatchKernelService.java


注:本文中的javax.batch.operations.JobExecutionNotRunningException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。