I am messed up with understanding concepts of JTA transactions, BMT/CMT, Persistence context with transaction propagation.
From EJB3 Specs :
The extended persistence context exists from the point at which the entity manager has been created
using EntityManagerFactory.createEntityManager until the entity manager is closed by
means of EntityManager.close. The extended persistence context obtained from the application-
managed entity manager is a stand-alone persistence context—it is not propagated with the transaction.
I am not very clear with what can be the consequences of persistence context not being propagated with the transaction.
Please also suggest that if there is any thing invalid in this code?? I have just created this hypothetical code to explain my doubt. In deadly need to clear these confusions.