Many applications within the enterprise domain require bulk processing to perform business operations in mission critical environments. These business operations include automated, complex processing of large volumes of information that is most efficiently processed without user interaction. These operations typically include time based events (e.g. month-end calculations, notices or correspondence), periodic application of complex business rules processed repetitively across very large data sets (e.g. insurance benefit determination or rate adjustments), or the integration of information that is received from internal and external systems that typically requires formatting, validation and processing in a transactional manner into the system of record. Batch processing is used to process billions of transactions every day for enterprises.
Spring Batch is a lightweight, comprehensive batch framework designed to enable the development of robust batch applications vital for the daily operations of enterpris
e systems. Spring Batch builds upon the productivity, POJO-based development approach, and general ease of use capabilities people have come to know from the Spring Framework, while making it easy for developers to access and leverage more advance enterprise services when necessary.
Spring Batch provides reusable functions that are essential in processing large volumes of records, including logging/tracing, transaction management, job processing statistics, job restart, skip, and resource management. It also provides more advance technical services and features that will enable extremely high-volume and high performance batch jobs though optimization and partitioning techniques. Simple as well as complex, high-volume batch jobs can leverage the framework in a highly scalable manner to process significant volumes of info.
Now let’s put in practise this framework propose by Spring :
=> Please Visit this Page
Summary of this article:
In this article, we will walk through some of the capabilities provided by Spring batch Framework
Why use Spring Batch? Personally, when I sit down to work with batch, I get frustrated with the amount of code that you need to write to do simple things I/O, manage batches error cases …
Spring batch let’s us use all capability of spring and provide powerful tool with few lines XML configuration.
Source :
You can checkout the source in Eclipse IDE using SVN here is the address of the source :
http://code.google.com/p/artaud/source/browse/#svn/springbatch
https://github.com/DoctusHartwald/artaud
In this article we’ll walk through these case :
-Case 1 : Hello World
-Case 2 : Import CSV => Database
Case 3 : Export Database => flat file
-Case 4 : Export Database=> XML
-Case 5 : Couple Spring Batch and Velocity template.
-Case 6 : export our database to a Jasper Report in PDF.
Technologies used :
I assume the reader to have good knowledge in basic Spring and Spring Annotations.
Spring
- Spring Annotation
- SpringBatch
- Spring OXM
- Spring Test
Related framework :
- Apache Velocity
- Xstream /Stax (for xml)
- Jasper
Database : MySQL