Page 1 of 1

About Question enthuware.oce-jpad.v6.2.382 :

Posted: Sat Aug 25, 2012 5:09 am
by ETS User
What's the difference between :

Code: Select all

void rollback()

and 

void setRollbackOnly()

Re: About Question enthuware.oce-jpad.v6.2.382 :

Posted: Sat Aug 25, 2012 3:52 pm
by admin

void rollback()
Roll back the transaction associated with the current thread.

void setRollbackOnly()
Modify the transaction associated with the current thread such that the only possible outcome of the transaction is to roll back the transaction.
From the method descriptions, it seems that rollback will rollback the transaction while setRollbackOnly will only set some kind of a flag that will cause an exception to be thrown if someone tries to commit that transaction.