Preventing circumvention of Spring Batch framework
One of the important aspects of the Spring Batch framework in my opinion is the fact that all jobs that use the same basic service configuration are handled consistently in terms of interaction with the repository, etc.
However, there is at least one hole in this - if a tasklet calls System.exit, for instance, the framework will exit without performing any further tasks.
I submitted this as a feature request already, since I believe this should be handled consistently by Spring Batch and should not require the end user to have to intervene to enforce this.
I was hoping I could get some input back from the community as to whether this ought to be part of the framework or implemented individually, whether or not you see this as a real problem, how it should be implemented alternatively, etc.
My original proposal was to register a new SecurityManager (which would use as its basis the current SecurityManager) that would to capture calls to exit the VM during execution and map it to a Spring Batch exception, thus allowing the repository to be properly updated. Any thoughts as to whether or not this is sufficient, prudent, etc?
Please reference original request at:
http://opensource.atlassian.com/proj...owse/BATCH-131
Comments greatly appreciated!