[Rejected] Add support for Java Extension Class Loader. #62
Conversation
adjust pom.xml,add maven-dependency-plugin
* main: (28 commits) fix release doc (#61) Support Jedis' Transaction and fix duplicated enhancement (#57) Initialize 8.9.0 iteration (#59) Polish release shell and doc. (#58) fix rocketmq message header properties garbled characters issue (#54) Fix netty-socketio plugin test failure (#56) Add okhttp2.x plugin (#49) add e2e test for kafka transporter (#42) Fix version badge (#53) Add JDK17 supported declaration. (#52) Fix instrumentation v2 API doesn't work for constructor instrumentation. (#51) Add kylin jdbc plugin (#45) Fix version compatibility for JSON-RPC4J Plugin (#50) Feature add clickhouse jdbc plugin (#41) Update menu.yml (#48) Fix format. (#47) Add new menu for the document (#46) Doc: Update setup agent in kubernetes from 'containers' to 'initContainers'. (#44) The httpasyncclient-4.x-plugin does not take effect every time. (#40) Add an agent plugin to support Jackson (#39) ... # Conflicts: # .github/workflows/plugins-test.3.yaml # CHANGES.md # docs/en/setup/service-agent/java-agent/README.md # docs/menu.yml
|
To reviewers(@apache/skywalking-committers), when you merge this, please make sure we have @daimingzhi listed as a co-author of this PR. Because of |
|
I noticed precious plugin test codes didn't verify this feature. Because Spring classloader includes target jars in the Spring fatjar, which means the httpclient jars are not loaded through ext-classloader. |
|
An update, |
|
@daimingzhi According to JDK 11 is widely used and recommended to use. JDK8 would be the only LTS JDK. JDK8 EOF update
So, generally, according to the roadmap of JDK, Same as this reason, I would NOT bump up agent version to v9. Let's stay in v8 for longer. |
CHANGESlog.To @apache/skywalking-committers
I am planning to bump up the version of Java agent after this gets merged. 9.0.0 would be the next major version to indicate we added Extension ClassLoader support in the core level.
First and most importantly, this credit and contribution belongs to @daimingzhi. I am just finishing this PR with a little conflict resolving, polishing, and fix a little error in the plugin test.
Extension ClassLoader
Extension ClassLoader: The Extension ClassLoader is a child of Bootstrap ClassLoader and loads the extensions of core java classes from the respective JDK Extension library.
It loads files from jre/lib/ext directory or any other directory pointed by the system property java.ext.dirs.
User decides which parts of the service should be loaded by the extension classloader, so, we open
plugin.plugins_in_ext_class_loader=${SW_PLUGINS_IN_EXT_CLASS_LOADER:}in theagent.configfile.Through this setting, users declare plugins are for excClassloader. Multiple values should be separated by ",".
Also support wildcard(
\*),likeehcache\*.This PR originally started at #19, @daimingzhi and I have a long discussion about this topic there.