-
Feb 27th, 2012, 01:41 PM
#1
Accessing raw data from read flat files...
I have a batch process that uses chunk processing; it reads a flat file, and processes/writes a DTO to a Spring Integration channel.
I would like to be able to log raw line(s) from the flat file should they cause subsequent errors in processing downstream.
I am thinking of possibly extending PatternMatchingCompositeLineMapper to handle storing this raw information into my DTO, but I wanted to check if their was an easier way of doing this.
Chris
-
Feb 27th, 2012, 11:06 PM
#2
I think you are going to need to create a custom LineMapper and log then raw line in the mapLine method. If you don't like the idea of extending an existing line mapper, your custom LineMapper can just delegate to whatever LineMapper you are using. That way your delegate can be any LineMapper instance.
-
Feb 28th, 2012, 07:51 AM
#3
Yep - extending the lineMapper is the route I'm going.
I've only been using SB for a few weeks but I'm liking it a lot. Am finding that most of my time has gone from writing tedious batch code to learning how to configure the various facets of SB. 
Chrisj
-
Feb 28th, 2012, 09:59 AM
#4
I agree. I am in the middle of a project to move off the mainframe and Spring Batch is a key part of that.
-
Mar 20th, 2012, 03:42 AM
#5
I think you are going to need to create a custom Line Mapper and log then raw line in the map Line method. this idea suits it i think so
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules