?
Solved

Developing batch processing application using Spring Batch

Posted on 2008-06-16
6
Medium Priority
?
1,430 Views
Last Modified: 2013-11-13
Hello Experts,

I need to develop a batch processing application using Spring Batch, I am not sure where to start from.
If you can please provide me with some sample application /source code.

Thanks in advance
0
Comment
Question by:annapolistech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 21827396
I believe you are talking about the framework found at http://static.springframework.org/spring-batch/ .  If so that is a good place to start.  The documentation links on the left side of that page have "Use Cases", a User Guide, etc that seem to be inforrmative.  I don't know that framework so I can't say how helpful it is but there were some examples and help.  It would be my first start.

If you need more help then I can try to provide some more info but I would also point out the Forum link.

Since it is a framework are you using it with a specific language or environment?  That may be important for finding the best examples and info on using this.

Let me know how this helps or if you have a question.

bol
0
 

Author Comment

by:annapolistech
ID: 21844029
Hi,
Thanks for your reply.
I am developing a batch processing system in Java, using Spring Batch.
I did manage to run the sample application posted on the following URL

http://www.jroller.com/0xcafebabe/entry/spring_batch_hello_world_1

I had some issues running the sample code, but I have managed to fix those, using a tweak as follows.
There is a Maven batch file (job.bat) which needs a couple of parameters from a .java file  to kick off the batch processing.

I had a problem in starting the batch process using the .bat file, so I used another .java file which functions exactly like the .bat file to start the processing.

Can you go through the .bat file and let me know whether I can rewrite the batch file without using Maven.

Since this is a relatively new concept, there is very little documentation available.

Thanks again for your help.
Following is the .bat file
 
mvn clean compile exec:java -Dexec.mainClass=org.springframework.batch.core.launch.support.CommandLineJobRunner -Dexec.args="simpleJob.xml simpleJob"

Open in new window

0
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 2000 total points
ID: 21848039
The line above depends on Maven.  The first "word" is the command to run Maven's program file.  The rest are arguments and info on how or what to run.

Having said that I don't believe you have to use Maven.  It seems like Maven is just a tool to manage the build.  You should be able to do the build without it although you may have to find and fix what is causing the error.  The "non-Maven" version of the line above would be ...

java org.springframework.batch.core.launch.support.CommandLineJobRunner "simpleJob.xml simpleJob"

I don't know if ther arguments (the part in quotes) need the quotes or if there are really two arguments.  If you are missing some "dependencies" then that may explain the error but successful build with Maven, which will download them and help with that part.

I hope this helps and answers you latest question.  Let me know if you have a problem or question.  If you need a lot of help with Maven then it might help to open a new question for it.

bol
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 

Author Comment

by:annapolistech
ID: 21852965
Hi bol,

Thanks again for your solution.
I have tried using,
java org.springframework.batch.core.launch.support.CommandLineJobRunner "simpleJob.xml simpleJob"
but may be due to some class path issue, the batch file is not executing.
I'll try againg doing some modification in the batch file
There are two arguments present in the .bat file - simpleJob.xml and simpleJob

Thanks

0
 

Author Comment

by:annapolistech
ID: 21873266
Hi boI,

Thanks for your assistance.  Since this a relatively new technology, there is very less material available to go through. I guess trying out different things will eventually make it clearer and understandable.
So I am closing this question now.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 21876128
Your welcome!  I'm glad I could help and sorry I couldn't help more with Maven.  Thanks for the fun question, the grade and the points.

bol
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Introduction to Processes
Starting up a Project
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question