Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-623

Query cancel and timeout support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • JDO 3 (3.0)
    • api, tck
    • None

    Description

      JDO doesn't have a mechanism to stop queries from overrunning. JPA2 now allows
      a persistence property to allow timing them out, and most JDO implementations
      have allowed this as an extension since JDO1. It would make sense for JDO
      (2.3) to have the same or a variation. I propose having the following

      Simple PMF property "javax.jdo.option.queryTimeout" to specify the number of millisecs (or secs) before any query is timed out. Throw a QueryTimeoutException (extends JDOException) when the timeout happens.

      Add methods Query.setTimeout(int), Query.getTimeout() to allow setting/retrieving the timeout interval on a per-query basis.

      Add method Query.cancel() to cancel any running query. If an implementation doesn't support cancelling of queries then it should throw a JDOUnsupportedOptionException. Any query execute() that is cancelled will throw a QueryInterruptedException (extends JDOUserException).

      Attachments

        1. jdo623.patch
          12 kB
          Craig L Russell
        2. JDO-623-ZeroTimeoutTestcase.patch
          14 kB
          Michael Bouschen
        3. JDO-623-testcase.patch
          26 kB
          Michael Bouschen
        4. jdo623.patch
          14 kB
          Craig L Russell
        5. JDO-623-tck2-mbo.patch
          15 kB
          Michael Bouschen
        6. pmf_option.patch
          0.7 kB
          Andy Jefferson
        7. query.patch
          1 kB
          Andy Jefferson
        8. JDO-623-mbo.patch
          3 kB
          Michael Bouschen
        9. query_timeout.patch
          10 kB
          Andy Jefferson

        Activity

          People

            mbo Michael Bouschen
            andyj Andy Jefferson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: