This content has been marked as final.
Show 1 reply
-
1. Re: Seam Transaction Management problem
mikkus70 Jan 10, 2012 4:27 AM (in response to oyesiji77)You're catching and handling the exception in the same code block, so it is as it never happened. Seam (or any other framework) gets to know there was an exception only when you don't catch it. If the exception was raised in the call to persist(), Hibernate would have marked the exception for rollback, but the ArithmeticException you're rising does not.
Try generating the exception and not catching it.
Also, be advised that transactions are not necessarily rolled back after an exception occurs. This happens only if the exception extends RuntimeException (which ArithmeticException does) or the exception is marked with @ApplicationException.