[hibernate-issues] [Hibernate-JIRA] Created: (EJB-317) Include cause in rollback exceptions
James Olsen (JIRA)
noreply at atlassian.com
Thu Oct 4 12:44:25 EDT 2007
Include cause in rollback exceptions
------------------------------------
Key: EJB-317
URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-317
Project: Hibernate Entity Manager
Issue Type: Improvement
Components: EntityManager
Affects Versions: 3.3.1.GA
Reporter: James Olsen
Attachments: ejb.patch
Some J2EE Servers fail fast following a call to setRollbackOnly() during commit processing and return an UnexpectedRollbackException or similar. There is currently no way for the caller to determine why the transaction was rolled back.
The attached patch makes use of the proprietary WLS setRollbackOnly(Throwable) method when available to ensure the cause (duplicate key, optimistic lock etc) can be returned to the caller.
In addition the patch includes a mechanism for translating the cause if desired (e.g. to map to an application defined exception hierarchy) as the commit flow is running in container code so there is no way to wrap it from the outside.
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list