Solved

Developing batch processing application using Spring Batch

Posted on 2008-06-16
6
1,377 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
  • 3
  • 3
6 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:annapolistech
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A publishing tool, a Version Control System, or a Collaboration Platform! These can be some of the defining words for the two very famous web-hosting Git repositories: Bitbucket and Github. Git is widely used amongst the programmers and developers f…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now