ringerc wrote:
Quote:
Yes, I do.
First, I tried to insert a row within a transaction, but the row validated constaint. So I have to insert it again after I corrected it.
Yes, you do
what?
Anyway ... if the row fails a constraint check, the persistence exception thrown as a result
trashes your Session. You'll need to close it and re-run your work in a
new session with the fixed data.
If that's not very appealing, you can always pre-check the validity of your data rather than just inserting it and praying.
I mean I did my work within transaction.
I did close the session in every hibernate calling, which is in finally section.
because I used hibernate CRUD in session bean, which is CMT, so do I need to catch each exception and rollback the transaction?