As everyone knows, pratically any enterprise application needs to execute long time running processes, like creating billing reports, creating invoices, handling payroll and many other similar examples.
Java EE defines a lot of enterprise-level constructs (EJBs,
Servlet, RESTFul API ...) and services, and you may run all of them in an Application Server. Typically an application server is used to deploy interactive applications (mainly web based, but there's place for server-side of desktop client applications too), and I'm not aware of an "Batch Application Server" specialized to hosting batch processes.
With JSR 352 - or Java Batch API, you are able to deploy batch jobs in an application server. Since I'm required to propose a batch-processing solution, I stared reading here and there, and at the moment I'm oriented to propose following solution:
- use a Java EE 7 compliant application server as batch-server;
- adopt Spring batch as framework to write and execute batch jobs;
- develop each job as a WAR project, so that I can redeploy a single artifact and I should be able to expose a REST based API to start, stop, restart jobs (it seems that Spring took a similar approach).
The question is: what shortcomings do you see in proposed approach ? Generally, how do you deal with background and batch processing of long-lasting operations ?
I'd love to hear your suggestions !