Apache JDO Project - setRollbackOnly() and what is thrown by commit()

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > November 2006 > setRollbackOnly() and what is thrown by commit()





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author setRollbackOnly() and what is thrown by commit()
Andy Jefferson

2006-11-13, 8:09 am

Hi,

in the JDO2-final spec 13.4.5
<spec>
Once a transaction has been marked for rollback via setRollbackOnly, the
commit method will always fail with JDOFatalDataStoreException. The JDO
implementation must not try to make any changes to the database during commit
when the transaction has been marked for rollback.
</spec>

whereas in the javadocs for javax.jdo.Transaction "setRollbackOnly" we have
"Sets the rollback-only status of the transaction to <code>true</code>. After
this flag is set to <code>true</code>, the transaction can no longer be
committed, and any attempt to commit the transaction will throw
<code>JDOUserException<code>."

So which exception should be thrown here ... JDOFatalDataStoreException or
JDOUserException ? probably the version in the spec.

Do you require a JIRA ?

--
Andy

Craig L Russell

2006-11-13, 1:11 pm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com