Expert |
|
Joined: Fri Oct 28, 2005 5:38 pm Posts: 390 Location: Cedarburg, WI
|
Hibernate version: 1.20GA
In my implementation of IInterceptor.BeforeTransactionCompletion, if I throw an exception, the transaction is still committed and IInterceptor.AfterTransactionCompletion gets called. The transaction is marked as committed rather than rolled back.
If something goes wrong in IInterceptor.BeforeTransactionCompletion, how do I stop the transaction from committing? I am wrapping the exception in a HibernateException, since this is what the documentation says should be done for in other IInterceptor methods ...
|
|