rmannibucau commented on pull request #65: URL: https://github.com/apache/openjpa/pull/65#issuecomment-663085420
@dazey3 yep, the one mentionned on the list and the PRs: tmploader==apploader. The toggle just disable enhancement under some setups (close to openliberty ones where the load class goes into the apploader which implements itself the transformer). That said you have a very good point that JVM instrumentation does not need that since it skips by itself the nested enhancement so seems it is only appearing on custom classloaders in app servers (like tomcat or openliberty). So overall it seems it means that it is an application server bug that this boolean is needed. Regarding the exclude list vs boolean: the exclude list makes the behavior deterministic vs the boolean depends which classes where touched or not before which is way less deterministic and error prone so between both I prefer the exclude list to at least guarantee the understanding is unique. However, in regards to previous point it seems we should just drop this as a default behavior and use a config to have a nested exclusion for buggy servers for compatibility only. Concretely it would be something like: if "openjpa.agent.preventNestedTransformations=true" then we wouldnt use PCClassFileTransformer but HarnessedPCClassFileTransformer which would fully delegate to PCClassFileTransformer but transform method*s* would be wrapped in with this boolean: if (transforming.get() != null) return null; transforming.set(true); try { delegate.transform(); } finally { transforming.remove(); } This way we handle buggy impls with a flag but our default is sane and aligned on the JVM. Long term we can report the bugs in the app servers and make them properly fix it (it is not limited to openjpa). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org