Announcement Announcement Module
Collapse
No announcement yet.
Job parameters from JobExecutionListener? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Job parameters from JobExecutionListener?

    This may be a simple question, I could figure out that I can get JobParameters from StepExecutionListeners, trying to figure out how can I get the same from JobExecutionListener?

    thanks!

  • #2
    jobExecution.getJobInstance().getJobParameters(). Does that work?

    Comment


    • #3
      That worked Dave!! Thanks!!

      Comment


      • #4
        Hey,

        i am facing same issue in my project.
        So we can access jobparameter using jobExecution.getJobInstance().getJobParameters().. .

        But how can we get that instance of jobExecution in cutomized itemreader implemetation class.

        Thanks in advance
        Shahul

        Comment


        • #5
          If you're wanting to access the JobParameters from an ItemReader, I would use a StepExecutionListener, which will give you a StepExecution, from which you can call getJobParameters. You will simply need to register you reader as a listener:

          http://static.springframework.org/sp...n.html#d0e3811

          Comment


          • #6
            Thanks Lucas its working....

            Comment

            Working...
            X