The spec and the TCK mandate the way I did it.

Woelke, Milan wrote:
Hi, I was looking over the code of the ejb3 entitymanager (abstractentitymanager) and I was wondering about one thing: Most of the methods defined by the entitymanager interface specification are implemented there with a try catch block protecting the whole method. In many cases the method throwPersistenceException(PersistenceException) is called either directly or indirectly, which then marks the transaction for rollback and rethrows the exception. My problem is that I don't think the rollback is correct here. IMHO the exception should be simply rethrown, for the bean provider to react to. If the bean provider chooses to not handle the exception the container provider should be the one marking the transaction for rollback.
Am I getting something wrong or should this be fixed??

Regards, Milan Wölke



_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to