Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-447

Add JDBC lock implementation for PostgreSQL

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.3
    • 2.2.9, 2.3.0, 3.0.0
    • karaf
    • None

    Description

      When using the org.apache.karaf.main.DefaultJDBCLock class together with PostgreSQL, you can run into this exception (caused by the setQueryTimeout() method not being implemented yet - http://jdbc.postgresql.org/todo.html):

      Failed to acquire database lock: org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4PreparedStatement.setQueryTimeout(int) is not yet implemented.
      

      We should at the very least document that the timeout should be set to 0 for PostgreSQL, but perhaps we'd better create a new JDBC lock implementation that hides this bit of knowledge from the users and provides them with a nice and easy way to use PostgreSQL for JDBC locking.

      Attachments

        1. karaf-2.3_447.diff
          11 kB
          Heath Kesler
        2. updated-karaf-3.0_447.diff
          3 kB
          Heath Kesler
        3. karaf_447.diff
          12 kB
          Heath Kesler

        Issue Links

          Activity

            People

              jgoodyear Jamie Mark Goodyear
              gertvanthienen Gert Vanthienen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: