Bug 5490 - Clarify JobContext/StepContext properties; fix TCK to not depend on writable Properties
Clarify JobContext/StepContext properties; fix TCK to not depend on writable...
Status: RESOLVED FIXED
Product: jbatch
Classification: Unclassified
Component: SPEC
1
PC Windows
: P5 major
: ---
Assigned To: ScottKurz
: 4710 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-24 18:50 UTC by ScottKurz
Modified: 2015-09-03 21:22 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ScottKurz 2013-10-24 18:50:45 UTC
This is mainly a TCK bug... (see public ML discussion with subject "...Should StepContext.getProperties() be allowed to hold application data?".

However I'm listing it in 'spec' category since it would only help to clarify the expectations here, namely:

1) the Properties are not necessarily writable.
2) the runtime may provide additional properties in addition to the ones corresponding to JSL elements.  

We might debate whether 2) is really worth saying, but it is here noted.
Comment 1 ScottKurz 2013-11-05 19:06:53 UTC
Note the 2013-11-06 update of the SE TCK has resolved this issue from the TCK perspective (by switching to use transient user data).

Leaving the bug open to track a spec clarification.
Comment 2 ScottKurz 2014-01-07 18:54:10 UTC
*** Bug 4710 has been marked as a duplicate of this bug. ***
Comment 3 ScottKurz 2014-01-07 20:36:36 UTC
Javadoc updated as follows:

JobContext:
----------------------------------------

java.util.Properties getProperties()

The getProperties method returns the job level properties specified in a job definition.

A couple notes:

    There is no guarantee that the same Properties object instance is always returned in the same (job) scope.
    Besides the properties which are defined in JSL within a child <properties> element of a <job> element, the batch runtime implementation may choose to include additional, implementation-defined properties. 

Returns:
    job level properties
----------------------------------------

StepContext:
----------------------------------------
java.util.Properties getProperties()

The getProperties method returns the step level properties specified in a job definition.

A couple notes:

    There is no guarantee that the same Properties object instance is always returned in the same (step) scope.
    Besides the properties which are defined in JSL within a child <properties> element of a <step> element, the batch runtime implementation may choose to include additional, implementation-defined properties. 

Returns:
    step level properties
----------------------------------------
Comment 4 ScottKurz 2015-09-03 21:22:51 UTC
Not sure what we could test here in the TCK so closing.