OpenJPA
  1. OpenJPA
  2. OPENJPA-1734

Support the DynamicEnhnacer on IBM JDK

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.1.0
    • Fix Version/s: 2.1.0
    • Component/s: Enhance
    • Labels:
      None

      Description

      OPENJPA-952 added support for an enhancer that utilized the Attach API, but at that time the IBM JDK didn't support that API. As of SR6 the Attach API is supported.

      This JIRA will be used to update InstrumentationFactory and doc.

        Issue Links

          Activity

          Hide
          Rick Curtis added a comment -

          Tested this change using the dynamic enhancer profile[1] successfully. There was one unexpected exception[2] that came from the jvm that I'm waiting on hearing back from the JVM folks on.

          c:\...\openjpa-parent>java -version
          java version "1.6.0"
          Java(TM) SE Runtime Environment (build pwi3260sr8-20100409_01(SR8))
          IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
          J9VM - 20100401_055940
          JIT - r9_20100401_15339
          GC - 20100308_AA)
          JCL - 20100408_01

          [1] mvn test -P test-dynamic-enhancer,test-derby
          [2] Exception in thread "Attachment 2889" java.lang.UnsupportedOperationException: cannot get the capability, performing dispose of the retransforming environment
          at com.ibm.tools.attach.javaSE.Attachment.loadAgentLibraryImpl(Native Method)
          at com.ibm.tools.attach.javaSE.Attachment.loadAgentLibrary(Attachment.java:244)
          at com.ibm.tools.attach.javaSE.Attachment.parseLoadAgent(Attachment.java:222)
          at com.ibm.tools.attach.javaSE.Attachment.doCommand(Attachment.java:141)
          at com.ibm.tools.attach.javaSE.Attachment.run(Attachment.java:101)

          Show
          Rick Curtis added a comment - Tested this change using the dynamic enhancer profile [1] successfully. There was one unexpected exception [2] that came from the jvm that I'm waiting on hearing back from the JVM folks on. c:\...\openjpa-parent>java -version java version "1.6.0" Java(TM) SE Runtime Environment (build pwi3260sr8-20100409_01(SR8)) IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled) J9VM - 20100401_055940 JIT - r9_20100401_15339 GC - 20100308_AA) JCL - 20100408_01 [1] mvn test -P test-dynamic-enhancer,test-derby [2] Exception in thread "Attachment 2889" java.lang.UnsupportedOperationException: cannot get the capability, performing dispose of the retransforming environment at com.ibm.tools.attach.javaSE.Attachment.loadAgentLibraryImpl(Native Method) at com.ibm.tools.attach.javaSE.Attachment.loadAgentLibrary(Attachment.java:244) at com.ibm.tools.attach.javaSE.Attachment.parseLoadAgent(Attachment.java:222) at com.ibm.tools.attach.javaSE.Attachment.doCommand(Attachment.java:141) at com.ibm.tools.attach.javaSE.Attachment.run(Attachment.java:101)
          Hide
          Rick Curtis added a comment -

          The java.lang.UnsupportedOperationException was coming from the fact that we had "Can-Retransform-Classes: true" set in the generated agent jars META-INF/MANIFEST.MF file, but retransform is unsupported on IBM JDK.

          Show
          Rick Curtis added a comment - The java.lang.UnsupportedOperationException was coming from the fact that we had "Can-Retransform-Classes: true" set in the generated agent jars META-INF/MANIFEST.MF file, but retransform is unsupported on IBM JDK.
          Hide
          Michael Dick added a comment -

          Closing issues which have been resolved for some time. If the problem persists, please reopen.

          Show
          Michael Dick added a comment - Closing issues which have been resolved for some time. If the problem persists, please reopen.

            People

            • Assignee:
              Rick Curtis
              Reporter:
              Rick Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development