use of com.navercorp.pinpoint.bootstrap.module.JavaModule in project pinpoint by naver.
the class ModuleSupport method setup.
public void setup() {
// pinpoint module name : unnamed
JavaModule bootstrapModule = getBootstrapModule();
logger.info("pinpoint Module id:" + bootstrapModule);
logger.info("pinpoint Module.isNamed:" + bootstrapModule.isNamed());
logger.info("pinpoint Module.name:" + bootstrapModule.getName());
JavaModule baseModule = getJavaBaseModule();
baseModule.addExports("jdk.internal.loader", bootstrapModule);
baseModule.addExports("jdk.internal.misc", bootstrapModule);
baseModule.addExports("jdk.internal.module", bootstrapModule);
// baseModule.addExports("java.lang.reflect", bootstrapModule);
}
use of com.navercorp.pinpoint.bootstrap.module.JavaModule in project pinpoint by naver.
the class ModuleSupport method newAgentModule.
private JavaModule newAgentModule(ClassLoader classLoader, URL[] jarFileList) {
ModuleBuilder moduleBuilder = new ModuleBuilder();
final Module agentModule = moduleBuilder.defineModule("pinpoint.agent", classLoader, jarFileList);
return wrapJavaModule(agentModule);
}
use of com.navercorp.pinpoint.bootstrap.module.JavaModule in project pinpoint by naver.
the class ModuleSupport method addPermissionToGuiceModule.
private void addPermissionToGuiceModule(JavaModule agentModule) {
JavaModule loggingModule = loadModule("java.logging");
agentModule.addReads(loggingModule);
// google guice
// java.base does not "opens java.lang" to module pinpoint.agent
// at pinpoint.agent/com.google.inject.internal.cglib.core.$ReflectUtils.<clinit>(ReflectUtils.java:42)
JavaModule javaBaseModule = getJavaBaseModule();
javaBaseModule.addOpens("java.lang", agentModule);
}
use of com.navercorp.pinpoint.bootstrap.module.JavaModule in project pinpoint by naver.
the class ModuleSupport method addPermissionToLog4jModule.
private void addPermissionToLog4jModule(JavaModule agentModule) {
// required log4j
// configuration parser
JavaModule xmlModule = loadModule("java.xml");
agentModule.addReads(xmlModule);
// xml-api must be loaded from agentClassLoader -> ProfilerLibs.PINPOINT_PROFILER_CLASS
// ClassLoader agentClassLoader = agentModule.getClass().getClassLoader();
// Class.forName("javax.xml.parsers.DocumentBuilderFactory", false, agentClassLoader)
// agentModule.addOpens("javax.xml.parsers.DocumentBuilderFactory");
// PropertySetter bean.Introspector
JavaModule desktopModule = loadModule("java.desktop");
agentModule.addReads(desktopModule);
}
use of com.navercorp.pinpoint.bootstrap.module.JavaModule in project pinpoint by naver.
the class ModuleSupport method addPermissionToValueAnnotation.
private void addPermissionToValueAnnotation(JavaModule agentModule) {
JavaModule bootstrapModule = getBootstrapModule();
agentModule.addOpens("com.navercorp.pinpoint.profiler.context.config", bootstrapModule);
agentModule.addOpens("com.navercorp.pinpoint.profiler.instrument.config", bootstrapModule);
agentModule.addOpens("com.navercorp.pinpoint.profiler.plugin.config", bootstrapModule);
agentModule.addOpens("com.navercorp.pinpoint.profiler.context.monitor.config", bootstrapModule);
agentModule.addOpens("com.navercorp.pinpoint.profiler.context.thrift.config", bootstrapModule);
agentModule.addOpens("com.navercorp.pinpoint.profiler.context.grpc.config", bootstrapModule);
agentModule.addOpens("com.navercorp.pinpoint.grpc.client.config", bootstrapModule);
}
Aggregations