rzo1 commented on PR #306: URL: https://github.com/apache/openjpa/pull/306#issuecomment-6819024167
As discussed, self-attach is now fixed here too (OPENJPA-3078 closed as duplicate). Three more commits: - 7afc3c78c: `InstrumentationFactory` loads `com.sun.tools.attach.VirtualMachine` from the `jdk.attach` module instead of `tools.jar` (removed with the IBM/Mac variants), attaches via `ProcessHandle.current().pid()`, and tries only once per JVM. If `jdk.attach` is missing or self-attach is not allowed, it logs one info message pointing to `-Djdk.attach.allowAttachSelf=true`, `-javaagent` or build-time enhancement, and falls back as before. - 9643a944c: manual (dynamic enhancement, `openjpa.DynamicEnhancementAgent`) and a 4.2 migration note, incl. the JEP 451 `-XX:+EnableDynamicAgentLoading` hint. - c56578c5c: `TestDynamicEnhancementAgent` starts a child JVM with `-Djdk.attach.allowAttachSelf=true` and checks that an EMF loads the agent and an unenhanced entity gets enhanced. `TestInstrumentationFactory` and `TestDynamicEnhancementAgent` pass on JDK 17 and 25; `-Ptest-dynamic-enhancer` still runs 417 tests with 0 failures (JDK 21). The profile keeps the explicit `-javaagent`, so the suite does not depend on self-attach. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
