|
From: James C. <jim...@do...> - 2004-06-13 18:29:20
|
Does that also mean that a new Hibernate session is created if a data access occurs after the exception? (Think of an app that logs application failures to a database.) Also, is the discarding (shutting down) of a session handled by the transaction manager or some other wrapper? I'm trying to understand if the discard behavior is the same for checked or unchecked exceptions. Our apps are set up to throw checked exceptions when we think the application could recover from the failure. In cases where a checked exception is deemed fatal we control rollback using: TransactionInterceptor.currentTransactionStatus().setRollbackOnly(); > The Hibernate session will always get discarded properly, even when > exceptions get thrown during view rendering. If that doesn't happen in any > case, it's a bug in either Spring's interceptor/filter implementations (or > the servlet container's handling of filters, in case of > OpenSessionInViewFilter). > > Juergen |