-
Feb 27th, 2010, 09:21 AM
#1
Passing extra parameters to reader, processor and writer
I have a scenario where I need to pass multiple parameters to itemreader, item processor and itemwriter.
There parameters are independent of input and ouput parameters
For example these are like bean reference of logging service which logs all the errors (again this is not regular log4j) in data to a different file.
Errors can happen in reader, writer or processor.Again these parameters can't be set as bean reference. I need to pass as parameter to different steps within a job
Is there any way to make itemreader, processor, writer to take extra parameters?
-Shirny
-
Feb 28th, 2010, 01:51 AM
#2
readers writers and processors are just regular spring beans so you can use the standard spring's dependency injection.
If you want to pass Spring's specific parameters, you can use late binding as explained in the documentation
http://static.springsource.org/sprin...l#late-binding
-
Mar 2nd, 2010, 06:04 PM
#3
But if I want to pass extra parameter to the processor
As of now processor has input, output I want to pause another paramerter
-
Mar 3rd, 2010, 07:02 AM
#4
well, a processor is a spring bean. Inject whatever you need to using one of the standard Spring injection mechanisms
Tags for this Thread
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