Search in sources :

Example 1 with JavaModule

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);
}
Also used : JavaModule(com.navercorp.pinpoint.bootstrap.module.JavaModule)

Example 2 with JavaModule

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);
}
Also used : JavaModule(com.navercorp.pinpoint.bootstrap.module.JavaModule)

Example 3 with JavaModule

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);
}
Also used : JavaModule(com.navercorp.pinpoint.bootstrap.module.JavaModule)

Example 4 with JavaModule

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);
}
Also used : JavaModule(com.navercorp.pinpoint.bootstrap.module.JavaModule)

Example 5 with JavaModule

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);
}
Also used : JavaModule(com.navercorp.pinpoint.bootstrap.module.JavaModule)

Aggregations

JavaModule (com.navercorp.pinpoint.bootstrap.module.JavaModule)9 Providers (com.navercorp.pinpoint.bootstrap.module.Providers)1 JvmVersion (com.navercorp.pinpoint.common.util.JvmVersion)1