Spring Batch and Executors Framework

2.2k views Asked by At

Are these 2 Frameworks used for same purpose. If not why and how these are used in real time applications ? Are there any tutorials to learn these.

1

There are 1 answers

0
Ankur Srivastava On BEST ANSWER

Spring batch is meant for batch processing of files by executing them in a series of jobs .Batch processing could be reading from CSV or XML or any flat file and write it to DB .Spring Batch provides many made Classes to read/write CSV, XML and database. http://www.mkyong.com/tutorials/spring-batch-tutorial/

Java Executor service on the other hand is all about spawning multiple threads in a thread pool and executing them for any purpose be it batch or anything else,but here you have better control because of transaction management.Also , its a feature introduced from Java 5 onwards.Also there are many methods depends on you want to compute on a response or you don't want a response from future object . http://tutorials.jenkov.com/java-util-concurrent/executorservice.html