Is there any way to continue using an thread bound hibernate session after constraintviolation exception has been thrown? I\'m giving a short example here:
Session's documentation states that If the Session throws an exception, the transaction must be rolled back and the session discarded. The internal state of the Session might not be consistent with the database after the exception occurs..
AFAIK, there's no way to recover from this, I recall someone at work warning me not to use the session-per-request/OpenSessionInView-pattern because of these kinds of problems.