Problem rolling back database changes
843854May 10 2004 — edited May 24 2004Hi all,
I have a message driven bean which does a multiple update calls to an Oracle database. I want to commit all the db updates only at the end (after all update calls execute okay) and if there occurs any problem in any of the update calls, I want to rollback all the previously successful update calls I have already made. I am using container managed transaction via a mdb in Weblogic 7. I tried to use UserTransaction.setRollbackOnly() call but that did not completely help. This call rolled back the message altogether. All I wanted to do is, if there occurs any error during a database update, rollback just the database changes and just throw away the message. Is there a way I can just rollback the database changes? Any suggestions?? please.
Thanks