Here is what I am trying to achieve:
- A batch job server which provides a unify entry point for jobs of my applications and a centralized place for jobs to run, which is built on top of Spring Batch
- Different applications can create their jobs bundle and "deploy" under the batch job server. The "bundle" will contains the job definitions, dependency JARs etc.
- The application job bundle should be self-contained: 2 job bundles can have different version of same class (i.e. better to have separate classloaders for different bundles), so that developer will seldom need to worry about jobs of other applications.
- Hot deployment is NOT required. I can accept to stop my batch job server application, deploy the new bundle, do some config, and start the server again.
In brief, it is like a plugin-in system for Spring Batch jobs.
Until now, the way I am using Spring Batch is to build an application, with job definition being part of the application (either be part of the application source, or as dependencies). However when I am trying to have one batch server serving multiple applications, I fall into problems like, when application 1 needs to have minor change in its job, I will need to release the whole server (which includes jobs from other applications). I would want to see if:
- Is there any existing solution by Spring Batch etc?
- If there is no existing solution and I need to invent the wheel, what technologies should I take a look on?
ServiceLoaderfrom Java? OSGi?