Example usage for org.springframework.batch.core.configuration DuplicateJobException getMessage

List of usage examples for org.springframework.batch.core.configuration DuplicateJobException getMessage

Introduction

In this page you can find the example usage for org.springframework.batch.core.configuration DuplicateJobException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:com.iisigroup.cap.batch.handler.BatchHandler.java

private void jobRegistryLoad(BatchJob job) {
    org.springframework.core.io.Resource resource = batchSrv.getJobResource(job);
    ApplicationContext context = createApplicationContextFactory(CapAppContext.getApplicationContext(),
            resource);/*from w w w.j  a  v a2 s . co  m*/
    Job j = context.getBean(job.getJobId(), Job.class);
    jobRegistry.unregister(j.getName());
    try {
        jobRegistry.register(new ReferenceJobFactory(j));
    } catch (DuplicateJobException e) {
        e.getMessage();
    }
}