Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> BC4J: After Transaction.postChanges() fail, no further Transaction.postChanges() could succeed

BC4J: After Transaction.postChanges() fail, no further Transaction.postChanges() could succeed

From: Svetlin Nakov <nakov_at_hotmail.com>
Date: 19 Mar 2003 05:14:43 -0800
Message-ID: <13055656.0303190514.1fe78dbc@posting.google.com>


I use BC4J and have an entity.

  1. I delete a row with oracle.jbo.Row.remove().
  2. The row deletion is successfull.
  3. When I call oracle.jbo.Transaction.postChanges() it fails due to database constraints. I catch exception and show "unable to delete" to the user.
  4. When after this failure I try to insert a new row with oracle.jbo.ViewObjectImpl.createRow(), it succeedes.
  5. When I call oracle.jbo.Transaction.postChanges() it fails and says that the row can not be deleted due to constraints.

I need a way to tell BC4J to ignore the change that caused postChanges() to fail.

The same happens when I change some field of the oracle.jbo.Row object, call postChanges() and postChanges fail.

The only way to recover from this situation is to call Transaction.rollback(), but this causes the use to lose all modifications he has made after the last commit. I need to cancel the last modification without losing other changes.

Can anybody help resolving this issue? Received on Wed Mar 19 2003 - 07:14:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US