Bug 4393

Summary: Enough specified for step (and job) inheritance ?
Product: jbatch Reporter: ScottKurz
Component: sourceAssignee: cvignola
Severity: normal CC: issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: PC   
OS: Windows   

Description ScottKurz 2012-12-04 17:38:04 UTC
Just wanted to write up the working assumption used by the RI/TCK with respect to inheritance, to solicit comments in case there are thoughts that more (or different) detail is needed in the spec.

E.g. I realize that Spring Batch provides more/different capabilities here.

In the TCK we have artifacts like:


<job id="parent"...

<job id="child" parent="parent" ...

EXAMPLE 2 (no overlap w/ EXAMPLE 1):

<step id="parent"..>    <!-- Note this is the root element of the document -->

<job id="child" parent="parent" ...
    <step id="child" parent="parent"

So the "parent" step is defined in a separate XML document of which it is
the root element.

I call this out since it could be surprsing if one is expecting <job> to be
the root element of any JSL document.   Since nothing is said in the public draft spec, it's not currently violating the spec.

The way is currently tested in the TCK is by defining a logical "merge parent+child" TCK SPI which the implementation executing the TCK must implement.   I.e. no jobs are actually started... we just confirm that the abstract/logical merge results in the JSL it should result in per the inheritance merging rules.

One more point.. in the RI we make inheritance work by supplying a metadata XML as an index to associate the @parent values with a particular file.

I don't have an objection to this, I just wanted to make sure it didn't slip under the radar that the spec allowed this.
Comment 1 cvignola 2012-12-20 16:37:45 UTC
The spec will not stipulate how the parent is resolved.  That is an implementation decision. Nor will the spec stipulate what the root element in the parent definition is.  Again, that is an implementation decision.
Comment 2 cvignola 2013-01-16 15:25:21 UTC
spec was updated to say implementer must provide an implementation specific way to resolve the parent job xml reference,  with resolution from META-INF/batch-jobs as a last resort.