-
Jan 22nd, 2013, 03:10 AM
#1
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).
-
Jan 22nd, 2013, 10:53 AM
#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.
-
Jan 22nd, 2013, 03:04 PM
#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.
-
Jan 23rd, 2013, 01:57 AM
#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.
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