OpenJPA
  1. OpenJPA
  2. OPENJPA-1122

Remove JDBC 3 related reflection from DBDictionary

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0, 2.0.0
    • Fix Version/s: 2.0.0-M3
    • Component/s: jdbc
    • Labels:
      None

      Description

      The reflection on JDBC 3 LOB related methods in DBDictionary can be replaced with plain method calls as we now require Java 5.

      A short discussion took place on the dev list [1].

      [1] http://n2.nabble.com/JDBC-3-reflection-in-DBDictionary-tp2965629p2965629.html

        Activity

        Hide
        Milosz Tylenda added a comment -

        In fact, currently the putBytes,putString, putChars and invokePutLobMethod methods are not used. They are used only when maxEmbedded*lobSize property is != 1. This is the case only for OracleDictionary but that dictionary overrides the methods mentioned.

        I would also change the signatures to specify actual LOB types instead of Object unless somebody has an objection. For example

        public void putBytes(Object blob, byte[] data)

        would become

        public void putBytes(Blob blob, byte[] data)

        Show
        Milosz Tylenda added a comment - In fact, currently the putBytes,putString, putChars and invokePutLobMethod methods are not used. They are used only when maxEmbedded*lobSize property is != 1. This is the case only for OracleDictionary but that dictionary overrides the methods mentioned. I would also change the signatures to specify actual LOB types instead of Object unless somebody has an objection. For example public void putBytes(Object blob, byte[] data) would become public void putBytes(Blob blob, byte[] data)
        Hide
        Milosz Tylenda added a comment -

        Change applied to trunk and 1.3.x branch.

        Show
        Milosz Tylenda added a comment - Change applied to trunk and 1.3.x branch.

          People

          • Assignee:
            Milosz Tylenda
            Reporter:
            Milosz Tylenda
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development