My team has written an application which we've decided needs to run a process, we'll say about once a day, as long as the application is being used. I've never done anything like this in Java before so am hoping to get a better idea of how I'd design a solution.
Initially, I've been going through the Oracle 'Overview of Batch Processing' tutorial and trying to create a working example of a batch process. However, I got far enough along in the tutorial and read this line:
Starting a Batch Job from a Servlet - Note that the mere presence of a job XML file or other batch artifacts (such as ItemReader) doesn't mean that a batch job is automatically started when the application is deployed. A batch job must be initiated explicitly, say, from a servlet or from an Enterprise JavaBeans (EJB) timer or an EJB business method.
So it would appear that the functionality that I'm looking at does not necessarily entail a continuous process and has to be initiated manually.
Our initial thoughts on what we wanted to accomplish was to have a 'batch job' initiate a service which contained our business logic at least once a day. So I wonder:
- Is continuous processing something I should be able to accomplish with the batch processing api I'm looking at?
- If so, how does this commonly work?
- If not, how do Java developers typically handle this type of problem from a high level?