Bug 4124 - For global tran chunk step, are open/close performed in global tran?
For global tran chunk step, are open/close performed in global tran?
Status: CLOSED FIXED
Product: jbatch
Classification: Unclassified
Component: source
1
All All
: P5 minor
: ---
Assigned To: cvignola
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-13 22:02 UTC by ScottKurz
Modified: 2013-01-16 23:06 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 ScottKurz 2012-09-13 22:02:24 UTC
Say I'm in global transaction mode, my last checkpoint was just committed, and my app blows up in @AfterCheckpoint.

Do we agree that the step status is still set to STARTED?    

I.e. the commit/rollback of the last checkpoint by the runtime is only coordinated with the batch application's use of enlisted transactional resources... 
It is not coordinated with the updating of step and job/status.

In theory this could mean that on restart, you reach the 'start-limit' and end up in FAILED state even though the core chunk
processing for the step really completed.   I think that's fine.. just pointing this out in case anyone is looking at this thinking "why does this even matter?"

Separate, related question.. there is no other global transaction going to be present in global tran mode, e.g. in the beginning or
end of the step, correct?
Comment 1 cvignola 2012-10-05 20:16:21 UTC
I don't fully understand the question.  Seems to me the step status would be "failed", not "started".   And I don't see how this question relates to start limit.  Please clarify.  Thanks
Comment 2 ScottKurz 2012-10-05 21:10:18 UTC
(In reply to comment #1)
> I don't fully understand the question.  Seems to me the step status would be
> "failed", not "started".   And I don't see how this question relates to start
> limit.  Please clarify.  Thanks

------------------------------------------------------------------------------

Sorry, my example obscured my point.    What I was really getting at was that the step status was NOT set to COMPLETED.  

And bringing up 'start-limit' was probably unnecessary... I was just building the case that this was an interesting question and not hair-splitting.

------------------------------------------------------------------------------

There's a broader question/point here.    Are there any other local or global transactional scopes defined by this JSR (especially with respect to updating job/step status)? 

I think saying nothing further could be OK, since it implies undefined.    

This implies that say an @AfterStep/@AfterJob listener might not want to set autoCommit=false, since a particular container impl might run this portion of the app in a global tran.

So I just wanted to get in synch on this issue...

Thanks,
Scott
Comment 3 ScottKurz 2012-11-09 21:42:48 UTC
I'm going to pile on to my earlier comments and ask more simply:

For a global tran chunk step, should open/close be performed in a global tran as well?
Comment 4 cvignola 2013-01-16 16:36:57 UTC
open/close (on EE) run in a global tran - this is clear in section 8 of proposed final draft v1