1. OpenJPA
  2. OPENJPA-5

OpenJPA doesn't compile with JDBC 4


    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0, 0.9.6
    • Fix Version/s: 2.0.0-M3
    • Component/s: build / infrastructure
    • Labels:


      Patrick opines:
      OpenJPA implements Statement, ResultSet, Connection, and maybe a
      couple other JDBC interfaces. See
      org.apache.openjpa.lib.jdbc.Delegating*. We do this for a number of
      reasons: to resolve database-specific bugs in a transparent fashion, to
      provide logging, to handle reference counting, etc.

      The pressing issue is that we must provide implementations of all of the
      methods in the various java.sql interfaces. The fact that we do not
      implement the new JDBC4 methods is why OpenJPA won't currently compile
      against JDK6. This is pretty easy to fix; take a look at
      org.apache.openjpa.lib.jdbc.DelegatingStatement to see how we handled
      this for JDBC3. Since we know that we never invoke the new methods, we
      can happily throw unsupported operation exceptions for the new methods.

      However, these unsupported methods do provide a challenge. While Kodo
      doesn't use any of these methods, our mechanism for implementing them is
      limiting, in that users who obtain Connections from Kodo will not be
      able to use the new JDBC3/JDBC4 methods in their own code. Ideally, we
      should provide some means for people to designate to OpenJPA that it
      should use a dynamic proxy to implement the unimplemented methods. This
      shouldn't be the default behavior, as the dynamic proxy will add
      overhead, but certainly could be desirable for some. I'll file an issue.

      1. openjpa-5.patch.3.txt
        99 kB
        Pinaki Poddar
      2. openjpa-5.patch.2.txt
        81 kB
        Pinaki Poddar
      3. OPENJPA-5.patch
        70 kB
        Marc Prud'hommeaux

        Issue Links


          Craig L Russell created issue -
          Patrick Linskey made changes -
          Field Original Value New Value
          Link This issue is cloned as OPENJPA-6 [ OPENJPA-6 ]
          Patrick Linskey made changes -
          Link This issue duplicates OPENJPA-4 [ OPENJPA-4 ]
          Kevin Sutter made changes -
          Link This issue blocks OPENJPA-114 [ OPENJPA-114 ]
          Patrick Linskey made changes -
          Component/s build / infrastructure [ 12311640 ]
          Kevin Sutter made changes -
          Fix Version/s 1.0.0 [ 12312341 ]
          Affects Version/s 0.9.6 [ 12312342 ]
          Affects Version/s 0.9.0 [ 12312343 ]
          Marc Prud'hommeaux made changes -
          Attachment OPENJPA-5.patch [ 12355476 ]
          Patrick Linskey made changes -
          Fix Version/s 1.0.0 [ 12312341 ]
          Pinaki Poddar made changes -
          Attachment openjpa-5.patch.2.txt [ 12403441 ]
          Pinaki Poddar made changes -
          Attachment openjpa-5.patch.3.txt [ 12403450 ]
          Donald Woods made changes -
          Link This issue relates to OPENJPA-1012 [ OPENJPA-1012 ]
          Pinaki Poddar made changes -
          Link This issue incorporates OPENJPA-1285 [ OPENJPA-1285 ]
          Donald Woods made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0.0-M3 [ 12314148 ]
          Resolution Fixed [ 1 ]
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Link This issue blocks OPENJPA-114 [ OPENJPA-114 ]
          Gavin made changes -
          Link This issue is depended upon by OPENJPA-114 [ OPENJPA-114 ]


            • Assignee:
              Craig L Russell
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: