Issue Details (XML | Word | Printable)

Key: BATCH-597
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dave Syer
Reporter: Ramkumar Krishnan
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Spring Batch
BATCH-773

Retrieving Job Parameters for a given job name

Created: 22/Apr/08 10:57 AM   Updated: 23/Sep/08 07:15 PM
Component/s: Core
Affects Version/s: 1.0.0
Fix Version/s: 2.0.0.M2

Time Tracking:
Original Estimate: 0.12d
Original Estimate - 0.12d
Remaining Estimate: 0.12d
Remaining Estimate - 0.12d
Time Spent: Not Specified
Remaining Estimate - 0.12d

Issue Links:
Related
 


 Description  « Hide
There should be a way to get the last used job parameters for a given job name!!.

http://forum.springframework.org/showthread.php?t=53098

So the developer can make the decision before launching the job whether to restart the job or create a new job instance.

 All   Comments   Work Log   Change History   FishEye   Related Builds      Sort Order: Ascending order - Click to sort in descending order
Douglas C. Kaminsky added a comment - 19/May/08 12:56 PM
This reminds me of our restartable conversation from waybackwhen.... namely, whether restartable=true|false is sufficient and understandable.

My original suggestion was to make it a non-binary flag, i.e. something to the effect of

restartable=always|never|create

i.e.
- always=always restart if possible
- incompleteOnly=only restart if the job is incomplete (equivalent of allowRestartIfComplete=false)
- never=never restart and throw exception if restart conditions occur (i.e. if job name / job parameters match incomplete execution)
- create=create a new instance automatically if restart conditions occur (also would account for case where restartable job has no arguments)

Or something like that - I still think there's value to this.

Dave Syer added a comment - 20/May/08 12:53 PM
You can launch the job and catch JobInstanceAlreadyComplete. I think that's good enough for me. If you need a flag you can write a wrapper for the JobLauncher that does the catch and takes whatever action you need (it would depend on the specific situation).

Dave Syer added a comment - 11/Jul/08 12:00 PM
This is sort of a duplicate of BATCH-341. It will probably be fixed at the same time.

Dave Syer added a comment - 18/Aug/08 03:43 AM
Fixed for BATCH-773. See JobOperator interface.