JDO
  1. JDO
  2. JDO-415

DataStoreConnection assumes datastore transactions are being used

    Details

      Description

      org.apache.jdo.tck.api.persistencemanager.DataStoreConnection assumes that the connection returned from getDataStoreConnection will be re-used once a JDO transaction is started, but that assertion is only valid when using datastore transactions, and the test case does not ensure that a datastore transaction is being used.

      The solution is to call "getPM().currentTransaction().setOptimistic(false);" just before "getPM().currentTransaction().begin();" in the testDataStoreConnection() test case.

      1. JDO-415.patch
        2 kB
        Craig L Russell

        Activity

        Marc Prud'hommeaux created issue -
        Marc Prud'hommeaux made changes -
        Field Original Value New Value
        Link This issue is cloned as JDO-418 [ JDO-418 ]
        Marc Prud'hommeaux made changes -
        Link This issue is cloned as JDO-418 [ JDO-418 ]
        Craig L Russell made changes -
        Assignee Craig Russell [ clr ]
        Description
        org.apache.jdo.tck.api.persistencemanager.DataStoreConnection assumes that the transaction returned from getDataStoreConnection will be re-used once a JDO transaction is started, but that assertion is only valid when using datastore transactions, and the test case does not ensure that a datastore transaction is being used.

        The solution is to call "getPM().currentTransaction().setOptimistic(false);" just before "getPM().currentTransaction().begin();" in the testDataStoreConnection() test case.

        org.apache.jdo.tck.api.persistencemanager.DataStoreConnection assumes that the connection returned from getDataStoreConnection will be re-used once a JDO transaction is started, but that assertion is only valid when using datastore transactions, and the test case does not ensure that a datastore transaction is being used.

        The solution is to call "getPM().currentTransaction().setOptimistic(false);" just before "getPM().currentTransaction().begin();" in the testDataStoreConnection() test case.

        Craig L Russell made changes -
        Attachment JDO-415.patch [ 12342224 ]
        Craig L Russell made changes -
        Fix Version/s JDO 2.0 TCK challenge fixes [ 12312093 ]
        Fix Version/s JDO 2 maintenance release 1 [ 12310923 ]
        Craig L Russell made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Andy Jefferson made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Craig L Russell
            Reporter:
            Marc Prud'hommeaux
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development