May 1st, 2009, 01:37 PM
Running a sample Spring Batch job
I am a newbie to Spring and Spring Batch. Installed Spring-Batch-2.0.0.
Wondering if there is already simple steps to follow for executing any of the existing sample codes with or without modifications where I can read an input file and do simple query using the data in it in my Oracle 10g db and create an output file? Also, it would be quite helpful for a newbie like me to get my feet wet with this framework and understand how the JobRepository table gets populated. We are trying to convert a legacy based batch processing application (unix kornshell and COBOL based) which basically is initiated by a user request. The user sends a fixed length input file to a incoming directory and initiates the execution of the current batch process which basically is a execution sequences of various data validation and db queries. Finally a fixed length output file is created and put into the outgoing directory. The User request application is implemented using JDK 1.5, JBoss Seam framework, jBPM, JSF, EJB3.0and Oracle10g etc. We wanted to try out Spring Batch because of the framework has all the basic functionalities of a batch job like Error Recovery, Restart etc.
Thanking you all.
May 1st, 2009, 02:39 PM
You should check out the spring-batch-samples project (available through subversion at https://src.springframework.org/svn/...batch-samples/). This project contains a wide array of demonstration batch jobs.
You can run these jobs easily through their JUnit classes (in Eclipse, for instance). You can also run them from the command line using the CommandLineJobRunner if you'd like.
May 1st, 2009, 03:23 PM
Thanks for responding to my mail. I will surely try out the link you mentioned.