alibaba / alibaba/one-java-agent
增强 java.lang.ClassLoader ,允许加载插件注册的类
- Dominant language
- Java
- Stars
- 579
- Forks
- 128
- PR merge metrics
- No merged PRs in 30d
Description
在插件增强目标类的字节码之后,通常会插入 插件自身的代码,那么要解决这些插入的代码的加载问题。
常见的办法有几种:
* 把插件的jar,强行加到ClassLoader的 urls里,像pinpoint就这样子的
* 把插件的jar,加到 system classloader的 urls,或者 bootstrap classloader的 urls
还有一种办法是增强 java.lang.ClassLoader ,在 loadClass 函数里,查找到插件的类,直接返回。
同时可能还要修改 checkPackageAccess 函数。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the java.lang.ClassLoader entry points named in the issue, especially loadClass and possibly checkPackageAccess, then inspect how this agent currently handles enhanced classes and plugin JARs. The issue presents several possible approaches but names no files or tests; progress requires deciding the loading design and defining how plugin-registered classes should be resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100