Issue Details (XML | Word | Printable)

Key: BATCH-159
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Dave Syer
Reporter: Dave Syer
Votes: 0
Watchers: 1
Operations

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

JobExecutor should return a JobExecution (which itself contains the ExitStatus)

Created: 05/Oct/07 05:06 AM   Updated: 07/Aug/08 10:06 AM
Component/s: Core
Affects Version/s: 1.0-m2
Fix Version/s: 1.0-m3
Security Level: Public (Public Issues)

Time Tracking:
Not Specified


 Description  « Hide
JobExecutor should return a JobExecution (which itself could contain the ExitStatus)

 All   Comments   Work Log   Change History   FishEye   Builds      Sort Order: Ascending order - Click to sort in descending order
Dave Syer added a comment - 10/Oct/07 03:53 AM
Added listener to JobExecutorFacade just to tidy up implementation, but might be useful in the future

Really this needs to go further - it's the JobExecutorFacade that might ultimately need to bye able to return asynchronously (e.g. with a TaskExecutorJobExecutor TBD), so the layer above seems like it might be redundant. I'm questioning whether there is a need for the JobLauncher interface at all. But the Thread.interrupt() in SimpleJobLanucher would not sit well in a JobExecutorFacade implementation.

Dave Syer added a comment - 22/Oct/07 08:14 AM
So here's a plan:

* Move the *JobLauncher features (concurrency and thread interruption) into helpers and/or subclasses in the JobExecutorFacade. Use JobExecutionListener where appropriate to register the context for the job with a helper (so the helpers have to be recognised as listeners and added to the chain).

* Handle stop() methods internally with ApplicationEvent having the JobIdentifier as a payload. Question: how many such methods to expose - ideally as few as possible - maybe eventually only one with JobIdenitifer parameter again (as per JobExecutorFacade currently)?

* Kill the JobLauncher interface.

Lucas Ward added a comment - 25/Oct/07 09:54 AM
I like the idea of removing the JobLauncher interface, and moving it's responsibility into the JobExecutorFacade (side note: is there anyway we can think about renaming this now that has more responsibility? Facade still doesn't sound right to me) I'm assuming if the JobIdentifier is the payload of an Event, then we would simply be creating or own version of ApplicationEvent?

Dave Syer added a comment - 05/Nov/07 12:24 PM - edited
All the external APIs are now where we wanted them. The internal stuff with stop signals is unimplemented (possibly unneeded, since the old functionality from before the refactoring is still there). Marking as resolved.

N.B. if anyone is following this issue but not the source code... the JobLauncher interface survived, but the JobExecutorFacade became private (where it belonged anyway).

We also didn't need to bother with the enhanced stop() functionality (it might come later if anyone asks).

Dave Syer added a comment - 07/Aug/08 10:06 AM
Assume closed as resolved and released