An unexpected, non-TransactionAbortedException will leave locks in place and fail to roll back transactions. Instead of catching only Exception in these situations, catch Exception; test for TransactionAbortedExceptions and rethrow, and wrap anything else you came across.


Index: org/exolab/castor/jdo/engine/DatabaseImpl.java
===================================================================
RCS file: /cvs/castor/castor/src/main/org/exolab/castor/jdo/engine/ DatabaseImpl.java,v
retrieving revision 1.9
diff -r1.9 DatabaseImpl.java
497c497
< } catch ( TransactionAbortedException except ) {
---
> } catch ( Exception except ) {
499c499,500
< throw except;
---
> if (except instanceof TransactionAbortedException) throw (TransactionAbortedException)except;
> else throw new TransactionAbortedException("jdo.txAborted", except);




----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev

Reply via email to