Jeff Hill - 2015-09-18

We are using One-Jar to deploy a Spring Batch application running within an Active Batch (version 9) plan. The jar is launched form a General->ShellCommand like this:

 Java -Xmx1400m -DcustomerId=${customerId} -jar myApp.jar ${ARGS}

We've found that when an ABAT plan is aborted while a Reader has a query running in SQL Server, the command shell is terminated, but the launched JVM and application remain in memory, and the query continues to run until it either completes, or the SPIDs are killed. When the latter happens, the Spring Batch framework finally gets an exception and throws an "unable to initialize reader", terminating the spring batch application. Note that this could be hours after the plan was aborted in the ABAT client.

A shutdown hook might provide a way to avoid this. Does the One-Jar Main class register a shutdown hook?

 

Last edit: Jeff Hill 2015-09-18