Package javax.batch.operations

Examples of javax.batch.operations.NoSuchJobExecutionException


    private List<StepExecution> findStepExecutions()
        throws JobSecurityException, NoSuchJobExecutionException {
        JobOperator jobOperator = AbstractListCommand.getJobOperatorFromBatchRuntime();
        JobExecution je = jobOperator.getJobExecution(Long.valueOf(executionId));
        if (!glassFishBatchSecurityHelper.isVisibleToThisInstance(((TaggedJobExecution) je).getTagName()))
            throw new NoSuchJobExecutionException("No job execution exists for job execution id: " + executionId);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(Long.valueOf(executionId));
        if (stepExecutions == null || stepExecutions.size() == 0)
            throw new NoSuchJobExecutionException("No job execution exists for job execution id: " + executionId);

        return stepExecutions;
    }
View Full Code Here


    private List<StepExecution> findStepExecutions()
        throws JobSecurityException, NoSuchJobExecutionException {
        JobOperator jobOperator = BatchRuntime.getJobOperator();
        JobExecution je = jobOperator.getJobExecution(Long.valueOf(executionId));
        if (!glassFishBatchSecurityHelper.isVisibleToThisInstance(((TaggedJobExecution) je).getTagName()))
            throw new NoSuchJobExecutionException("No job execution exists for job execution id: " + executionId);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(Long.valueOf(executionId));
        if (stepExecutions == null || stepExecutions.size() == 0)
            throw new NoSuchJobExecutionException("No job execution exists for job execution id: " + executionId);

        return stepExecutions;
    }
View Full Code Here

      }
    }

    public void remove(org.springframework.batch.core.JobExecution jobExecution) {
      if(!registry.containsKey(jobExecution.getId())) {
        throw new NoSuchJobExecutionException("The job execution " + jobExecution.getId() + " was not found");
      } else {
        registry.remove(jobExecution.getId());
      }
    }
View Full Code Here

      return registry.containsKey(jobExecutionId);
    }

    public Job getJob(long jobExecutionId) {
      if(!registry.containsKey(jobExecutionId)) {
        throw new NoSuchJobExecutionException("The job execution " + jobExecutionId + " was not found");
      } else {
        return registry.get(jobExecutionId);
      }
    }
View Full Code Here

  public void abandon(long jobExecutionId) throws NoSuchJobExecutionException,
  JobExecutionIsRunningException, JobSecurityException {
    org.springframework.batch.core.JobExecution jobExecution = jobExplorer.getJobExecution(jobExecutionId);

    if(jobExecution == null) {
      throw new NoSuchJobExecutionException("Unable to retrieve JobExecution for id " + jobExecutionId);
    }

    if(jobExecution.isRunning()) {
      throw new JobExecutionIsRunningException("Unable to abandon a job that is currently running");
    }
View Full Code Here

  public JobExecution getJobExecution(long executionId)
      throws NoSuchJobExecutionException, JobSecurityException {
    org.springframework.batch.core.JobExecution jobExecution = jobExplorer.getJobExecution(executionId);

    if(jobExecution == null) {
      throw new NoSuchJobExecutionException("No execution was found for executionId " + executionId);
    }

    return new JsrJobExecution(jobExecution, jobParametersConverter);
  }
View Full Code Here

  public JobInstance getJobInstance(long executionId)
      throws NoSuchJobExecutionException, JobSecurityException {
    org.springframework.batch.core.JobExecution execution = jobExplorer.getJobExecution(executionId);

    if(execution == null) {
      throw new NoSuchJobExecutionException("The JobExecution was not found");
    }

    return jobExplorer.getJobInstance(execution.getJobInstance().getId());
  }
View Full Code Here

  public Properties getParameters(long executionId)
      throws NoSuchJobExecutionException, JobSecurityException {
    org.springframework.batch.core.JobExecution execution = jobExplorer.getJobExecution(executionId);

    if(execution == null) {
      throw new NoSuchJobExecutionException("Unable to find the JobExecution for id " + executionId);
    }

    Properties properties = jobParametersConverter.getProperties(execution.getJobParameters());
    properties.remove(JsrJobParametersConverter.JOB_RUN_ID);
View Full Code Here

      NoSuchJobExecutionException, JobExecutionNotMostRecentException,
      JobRestartException, JobSecurityException {
    org.springframework.batch.core.JobExecution previousJobExecution = jobExplorer.getJobExecution(executionId);

    if (previousJobExecution == null) {
      throw new NoSuchJobExecutionException("No JobExecution found for id: [" + executionId + "]");
    } else if(previousJobExecution.getStatus().equals(BatchStatus.COMPLETED)) {
      throw new JobExecutionAlreadyCompleteException("The requested job has already completed");
    }

    List<org.springframework.batch.core.JobExecution> previousExecutions = jobExplorer.getJobExecutions(previousJobExecution.getJobInstance());
View Full Code Here

    private List<StepExecution> findStepExecutions()
        throws JobSecurityException, NoSuchJobExecutionException {
        JobOperator jobOperator = AbstractListCommand.getJobOperatorFromBatchRuntime();
        JobExecution je = jobOperator.getJobExecution(Long.valueOf(executionId));
        if (!glassFishBatchSecurityHelper.isVisibleToThisInstance(((TaggedJobExecution) je).getTagName()))
            throw new NoSuchJobExecutionException("No job execution exists for job execution id: " + executionId);

        List<StepExecution> stepExecutions = jobOperator.getStepExecutions(Long.valueOf(executionId));
        if (stepExecutions == null || stepExecutions.size() == 0)
            throw new NoSuchJobExecutionException("No job execution exists for job execution id: " + executionId);

        return stepExecutions;
    }
View Full Code Here

TOP

Related Classes of javax.batch.operations.NoSuchJobExecutionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.