Bug 4165 - Inheritance clarifications (5.8)
Inheritance clarifications (5.8)
Status: CLOSED FIXED
Product: jbatch
Classification: Unclassified
Component: source
1
All All
: P5 trivial
: ---
Assigned To: cvignola
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-28 15:18 UTC by mminella
Modified: 2013-01-16 23:08 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mminella 2012-09-28 15:18:49 UTC
* The spec allows for lists to be merged, yet guarantees order in other places (listeners for example are to be executed in the order they are configured, yet the list can be merged).  How does this work with inheritance?  Who executes first?  Spring Batch allows the ability to merge the lists but does not guarantee execution order.
* Are all aspects inheritable?  For example, if I configure a job that inherits from another job, do I inherit the steps in the parent job as well?  If so, how are they ordered?  Spring Batch does not bring the steps of a parent job into the child.
* 5.8.2 - Why does the parent id refer to the file name and not the id of the element?  Seems a bit odd and I would expect it to break down for things like steps...are we really going to define a new file for every step?  I would expect the parent id to be the id of the element itself.
Comment 1 cvignola 2012-10-05 21:38:14 UTC
* The spec allows for lists to be merged, yet guarantees order in other places
(listeners for example are to be executed in the order they are configured, yet
the list can be merged).  How does this work with inheritance?  Who executes
first?  Spring Batch allows the ability to merge the lists but does not
guarantee execution order.

My thinking was:  parent first - think of it as appending the child listeners to the parent's list.  If you think this is an issue, I'm willing to say no guarantee of execution order.  I don't think the rule is so important - just that we have one. 


* Are all aspects inheritable?  For example, if I configure a job that inherits
from another job, do I inherit the steps in the parent job as well?  If so, how
are they ordered?  Spring Batch does not bring the steps of a parent job into
the child.

What is the behavior of inheriting a job in Spring Batch?  If not the steps, seems like it's not very useful.


* 5.8.2 - Why does the parent id refer to the file name and not the id of the
element?  Seems a bit odd and I would expect it to break down for things like
steps...are we really going to define a new file for every step?  I would
expect the parent id to be the id of the element itself.

So we don't have to read all the XML in up front just to be ready in case there is inheritance. And to minimize the number of files that potentially have to be read.
Comment 2 cvignola 2012-10-10 18:15:38 UTC
In the public draft review edition,  I have updated the inheritance specification to (I think) match Spring.  The change includes not inheriting job steps and no guarantees of order for lists.

Regarding what the parent= value means,  I think we need to back off and leave that as an implementation detail.  It's not part of the programming model.  It's not part of the JSL model.  So I think that's ok.