public class JobLaunchingJobRepository
extends org.springframework.batch.core.repository.support.SimpleJobRepository
JobRepository implementation
provides the same functionality as Spring Batch's
SimpleJobRepository however
it does not re-hydrate a ExecutionContext when
querying for a JobExecution or a
StepExecution. This is done to prevent class
loading issues when launching jobs within Spring XD.| Constructor and Description |
|---|
JobLaunchingJobRepository(org.springframework.batch.core.repository.dao.JobInstanceDao jobInstanceDao,
org.springframework.batch.core.repository.dao.JobExecutionDao jobExecutionDao,
org.springframework.batch.core.repository.dao.StepExecutionDao stepExecutionDao,
org.springframework.batch.core.repository.dao.ExecutionContextDao executionContextDao) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.batch.core.JobExecution |
getLastJobExecution(java.lang.String jobName,
org.springframework.batch.core.JobParameters jobParameters)
Returns the last
JobExecution for the requested job without
rehydrating the related ExecutionContext. |
org.springframework.batch.core.StepExecution |
getLastStepExecution(org.springframework.batch.core.JobInstance jobInstance,
java.lang.String stepName)
Returns the last
StepExecution for the
requested step without rehydrating the related
ExecutionContext. |
public JobLaunchingJobRepository(org.springframework.batch.core.repository.dao.JobInstanceDao jobInstanceDao,
org.springframework.batch.core.repository.dao.JobExecutionDao jobExecutionDao,
org.springframework.batch.core.repository.dao.StepExecutionDao stepExecutionDao,
org.springframework.batch.core.repository.dao.ExecutionContextDao executionContextDao)
public org.springframework.batch.core.JobExecution getLastJobExecution(java.lang.String jobName,
org.springframework.batch.core.JobParameters jobParameters)
JobExecution for the requested job without
rehydrating the related ExecutionContext.getLastJobExecution in interface org.springframework.batch.core.repository.JobRepositorygetLastJobExecution in class org.springframework.batch.core.repository.support.SimpleJobRepositoryjobName - The name of the jobjobParameters - The parameters of the jobpublic org.springframework.batch.core.StepExecution getLastStepExecution(org.springframework.batch.core.JobInstance jobInstance,
java.lang.String stepName)
StepExecution for the
requested step without rehydrating the related
ExecutionContext.getLastStepExecution in interface org.springframework.batch.core.repository.JobRepositorygetLastStepExecution in class org.springframework.batch.core.repository.support.SimpleJobRepositoryjobInstance - The JobInstance the step
should come fromstepName - The name of the step to find