db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject setRollbackOnly() and what is thrown by commit()
Date Mon, 13 Nov 2006 12:52:08 GMT

in the JDO2-final spec 13.4.5
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.

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 

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

Do you require a JIRA ?


View raw message