JDO
  1. JDO
  2. JDO-442

Transaction.setRollbackOnly() : difference between api20 and spec

    Details

      Description

      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 ?

        Activity

        Andy Jefferson made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Craig L Russell made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Craig L Russell made changes -
        Field Original Value New Value
        Assignee Craig Russell [ clr ]
        Andy Jefferson created issue -

          People

          • Assignee:
            Craig L Russell
            Reporter:
            Andy Jefferson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development