Issue Details (XML | Word | Printable)

Key: JDO-442
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Craig Russell
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JDO

Transaction.setRollbackOnly() : difference between api20 and spec

Created: 13/Nov/06 08:37 PM   Updated: 29/Sep/07 12:27 AM
Return to search
Component/s: api2, api2-legacy, specification
Affects Version/s: JDO 2 final
Fix Version/s: JDO 2 maintenance release 1

Time Tracking:
Not Specified

Resolution Date: 29/Sep/07 12:27 AM


 Description  « Hide
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 ?

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #580804 Sun Sep 30 22:45:09 UTC 2007 clr JDO-442 Fix javadoc for Transaction.setRollbackOnly
Files Changed
MODIFY /db/jdo/trunk/api2/src/java/javax/jdo/Transaction.java
MODIFY /db/jdo/trunk/api2-legacy/src/java/javax/jdo/Transaction.java