Announcement Announcement Module
Collapse
No announcement yet.
Dynamically setting commit-interval Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamically setting commit-interval

    We have a scenario where the commit-interval is being set for each job by the admin. The value is stored in database. How can we set the commit-interval value for the chunk ,dynamically and not by specifying it in the xml (configuration).

  • #2
    I guess you can refer to job parameters when setting up the commit interval. Try with the usual #{jobParameters['my.key']} syntax and you would be able to specify the commit when launching the job.

    Comment


    • #3
      You can either use parameters (as noted by @arno) or you could create a custom CompletionPolicy that either reads from that database as you mentioned or accepts the parameters.

      Comment


      • #4
        The job parameters solution is straightforward but it impacts the identity of the job instance, thus restartability. The dynamic completion policy solution is more difficult to set up, but more elegant I guess.

        Comment

        Working...
        X