Bugzilla – Bug 4202
transaction text should say resources get auto-enlisted
Last modified: 2013-01-16 23:07:50 UTC
Maybe everyone would assume this anyway, but...
Should we have something like the EJB 2 spec says for CMT:
"The Container automatically enlists all the resource managers
accessed by the business method with the transaction."
I did list this as trivial but it seems like it closes the minor possibility of misinterpretation.
I think the batch spec must clearly identify where transaction scopes exist during the batch job lifecycle. I do not think the batch spec should say anything about resource enlistment because resource enlistment is outside the scope of the batch spec.
I think resource enlistment is critical in JEE since otherwise the programming model is potentially not standard (if you have to enlist yourself or with some other mechanism).
But I suppose you could take the perspective that if you're running in JEE you must be running in an EJB or servlet which already specifies that managed resources are enlisted in trans.
On the flip side..... transactions are tied to threads... and JobOperator will be spawning new threads... maybe it would be better to be clearer about enlistment.
On the other hand (flipping sides yet another time).... maybe this is more the domain of something like JSR 236 WorkManager thread.
I think there's a strong case that it needs to be specified, I'm just not proving that it's the batch spec that does it.. but then who does?
the spec says when global trans are used. pointing out that transactional resources get enlisted is unnecessary - that is well known.