Transaction in not marked as RollbackOnly when callback method throws RuntimeException
--------------------------------------------------------------------------------------
Key: EJB-373
URL:
http://opensource.atlassian.com/projects/hibernate/browse/EJB-373
Project: Hibernate Entity Manager
Issue Type: Bug
Components: EntityManager
Affects Versions: 3.2.1
Reporter: Jaroslaw Lewandowski
When RuntimeException is thrown in methods annotated by @PrePersist or @PreUpdate during
merge operation the transaction is not marked as rollback only.
Both Hibernate Documentation (A:
http://www.hibernate.org/hib_docs/entitymanager/reference/en/html_single/) and EJB3
Persistence specifcation (B) state that transaction should be marked as rollback only in
this case:
A: "A callback method can raise a RuntimeException. The current transaction, if any,
must be rolled back."
B: "Lifecycle callback methods may throw runtime exceptions. A runtime exception
thrown by a callback method that executes within a transaction causes that transaction to
be rolled back."
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira