Results 1 to 4 of 4

Thread: Adding custom parameters for app status

  1. #1
    Join Date
    Aug 2009
    Posts
    15

    Default Adding custom parameters for app status

    I need to add some custom parameters for each job run , like output file names, input files, count etc.
    Some of which are not already present in any of the contexts like stepcontext , jobcontext, etc

    What is best way to add these params , so that those are presisted in spring batch tables and can be retrieved using jobexplorer

    -Shriny

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    I must be missing something. Why don't you use JobParameters?

  3. #3
    Join Date
    Aug 2009
    Posts
    15

    Default

    These are runtime parameters which are generated dynamically and added at various steps.

    I can add most of the params in beforestep in stepcontext and jobcontext but is there any way of adding params at runtime so that those are presisted

  4. #4
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    The ExecutionContext is persisted. You can use ItemStream to manage the step-level context, and there are established patterns for transferring data to/from the job-level ExecutionContext. This is all covered in the user guide (http://static.springsource.org/sprin...tml#itemStream, http://static.springsource.org/sprin...aToFutureSteps). Since you mention stepContext and jobContext, I assume that is what you are already doing?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •