Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2602

OracleDictionary uses reflection way too often

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.4.1
    • Component/s: jdbc
    • Labels:
      None

      Description

      OracleDictionary has many Class.forName, getMethod and getField for oracle.jdbc.OraclePreparedStatement.
      This gets executed every time a setString gets used. Which can create quite some overhead.

      We might check those Members at construction time and use this info later at runtime.

      1. OPENJPA-2602.4review.4.patch
        8 kB
        Mark Struberg
      2. OPENJPA-2602.4review.2.patch
        8 kB
        Mark Struberg

        Activity

        Hide
        struberg Mark Struberg added a comment -

        Plz review this patch. I've switched out dynamic Class.forName etc with ones evaluated in the ct. The reason I like this to get reviewed before I commit it is to check that I didn't mess up any ClassLoader stuff (classes not being available during ct but only later, etc)

        Show
        struberg Mark Struberg added a comment - Plz review this patch. I've switched out dynamic Class.forName etc with ones evaluated in the ct. The reason I like this to get reviewed before I commit it is to check that I didn't mess up any ClassLoader stuff (classes not being available during ct but only later, etc)
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1701372 from Mark Struberg in branch 'openjpa/trunk'
        [ https://svn.apache.org/r1701372 ]

        OPENJPA-2602 replace ongoing Class.forName with 1x lookup to improve performance and minimize locks

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1701372 from Mark Struberg in branch 'openjpa/trunk' [ https://svn.apache.org/r1701372 ] OPENJPA-2602 replace ongoing Class.forName with 1x lookup to improve performance and minimize locks
        Hide
        struberg Mark Struberg added a comment -

        the version I committed.

        Show
        struberg Mark Struberg added a comment - the version I committed.

          People

          • Assignee:
            struberg Mark Struberg
            Reporter:
            struberg Mark Struberg
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development