Are there better and/or more comments for these 4 examples for (EE5) exam prep?
For example, one thing I think I possibly need take away from these examples is that persistence context is separate from how the entity manager processes underlying transactions, also illustrated by the 2nd and 3rd examples with em.joinTransaction(). It appears that although all these examples are application-managed persistence context, clearly 3 are container managed (JTA) transactions, while the other is resource local transaction. Is that appropriate? Are there better and/or more appropriate comments?
The last example "Example of application-managed Persistence Context with Resource Transaction" has a interesting title for folks that may want to incorrectly think in terms of persistence context "defining" transaction processing?