This content has been marked as final.
Show 1 reply
-
1. Re: entityManager.executeUpdate() doesn't rollback when datasource's jta = false in standalone.xml
sfcoy Jul 17, 2013 9:28 AM (in response to joe.chuah)In my opinion you should always use JTA in an enterprise java application. I'm not sure there's any good reason to set jta="false".
Furthermore, a container managed entity manager must be a "JTA entity manager" (§7.5 of the Java Persistence API 2.0 specification) and must be associated with a JTA DataSource.
In your example, when you set jta="false" the container managed transaction will not propogate the rollback instructions to the database because it's no longer aware that the database should be participating.