I am developing batch job in java-ee-7 on top of liberty server. using the REST API to launch the batch job. The issue here is when I tried to launch the batch job for the same input parameter, new job instance getting created. Whereas spring batch process, throws an error saying JobInstanceAlreadyExistsException. I am expecting something like this to avoid new job been created for the same input parameter
The input parameter and batch status has been stored in persistent storage in Oracle database using the liberty server tables (WLPJOBINSTANCE, WLPSTEPTHREADINSTANCE, wlpjobparameter etc).
<job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/jobXML_1_0.xsd"
id="my-batch-job" restartable="true" version="1.0">
</job>
Expected: Job should throw an exception if the same input parameter is passed. Actual: Its creating new job instance for the same input parameter