You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by sclark <sc...@euler.tat.fws.gov> on 2003/01/20 21:25:31 UTC
Bug in TransactionImpl.commit()
I have found a bug in TransactionImpl.commit(), in 0.9.8 (and in CVS HEAD). If
an exception other than TransactionAbortedException is thrown during commit, the
transaction can be left in an invalid state: isOpen() will return true, but
abort() will throw NullPointerException. The reason seems to be that only
TransactionAbortedException is handled and rethrown. In my case, prepare() is
throwing a PersistenceBrokerSQLException, which commit() never touches, and I
guess the result is a messed up Transaction.
I assume that the fix is to add a second catch (Exception ex) or some such to
the end of commit().
-steve