Bug 4182 - The transient user data in a Job Context needs to be cloneable or serializable.
The transient user data in a Job Context needs to be cloneable or serializable.
Status: CLOSED WORKSFORME
Product: jbatch
Classification: Unclassified
Component: source
1
PC Windows
: P5 normal
: ---
Assigned To: cvignola
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-03 19:06 UTC by kmukher
Modified: 2013-01-16 23:02 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 kmukher 2012-10-03 19:06:14 UTC
When we invoke parallel steps in a job, the parent job's context is partially copied to the parallel steps; specifically the job properties and the transient user data. Since each thread has it's own copy of the job context the transient data in the context needs to be either cloneable or serializable so we are able to make a proper copy of it.
Comment 1 cvignola 2012-10-05 18:02:17 UTC
java.util.Properties is already cloneable/serializable.  I do not think transient data should be copied.  The transient data is intended to have strictly thread local behavior.
Comment 2 ScottKurz 2012-10-08 19:58:01 UTC
If it's supposed to be thread local behavior then I wonder if we need to say more about the "main" thread.  Are step1 and step2 guaranteed to run on the same thread?   What if step1 is followed by split2 which is followed by step3, are steps 1 and 3 guaranteed to run on the same threads?   

I think it would be valid to leave this undefined if that is your intention, but just trying to get you to commit to it in writing if you are assuming there will be a single thread in these cases.
Comment 3 cvignola 2012-10-08 20:38:14 UTC
Nope: there will be no requirement that a job's steps execute on the same thread. The transient area visibility is limited to a single step in a single job execution.  If the step is partitioned,  the visibility is limited to each partition. No sharing across threads;  between partitions;  or across job executions.