About Question enthuware.oce-jpad.v6.2.382 :
Posted: Sat Aug 25, 2012 5:09 am
What's the difference between :
Code: Select all
void rollback()
and
void setRollbackOnly()
Java Certification Resources and Java Discussion Forum
https://enthuware.com/forum/
Code: Select all
void rollback()
and
void setRollbackOnly()
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.
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.