Type: New Feature
See http://java.net/projects/jpa-spec/lists/users/archive/2012-06/message/27 for original detail. In short, define
However so far I have been unsuccessful to find out, whether it is portable behavior, for the container to call Transaction.commit() while
there are any XAResource enlisted with this Transaction, where start() had been invoked, but end() has not.
Also I have not found out yet, whether there are scenarios, where the container must not delist the XAResource. (Although not
directly applicable, the control flow diagram p.28/29 in the JTA spec suggests otherwise.)
If both is defined, i.e. container does not delist XAResource it keeps in it's invocation context before calling Transaction.commit() and
Transaction.commit() handles still enlisted resources fine (by calling beforeCompletion() first, calling end() after that, and then prepare+commit)
then we (i.e. the JPA spec) would not have a problem.
or allow that the current specification of "beforeCompletion callback methods can access the resources, but that no transactional work can be performed on resources in afterCompletion" is sufficient.