Java Code Examples for javax.management.MBeanServer#getClassLoaderRepository()

The following examples show how to use javax.management.MBeanServer#getClassLoaderRepository() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MLet.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 2
Source File: DefaultLoaderRepository.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 3
Source File: DefaultLoaderRepository.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 4
Source File: MLet.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 5
Source File: DefaultLoaderRepository.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 6
Source File: MLet.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 7
Source File: DefaultLoaderRepository.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 8
Source File: DefaultLoaderRepository.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 9
Source File: DefaultLoaderRepository.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 10
Source File: MLet.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 11
Source File: DefaultLoaderRepository.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 12
Source File: MLet.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 13
Source File: DefaultLoaderRepository.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 14
Source File: MLet.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 15
Source File: DefaultLoaderRepository.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 16
Source File: MLet.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 17
Source File: DefaultLoaderRepository.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 18
Source File: MLet.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}
 
Example 19
Source File: DefaultLoaderRepository.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Class<?> load(ClassLoader without, String className)
        throws ClassNotFoundException {
    final List<MBeanServer> mbsList = MBeanServerFactory.findMBeanServer(null);

    for (MBeanServer mbs : mbsList) {
        ClassLoaderRepository clr = mbs.getClassLoaderRepository();
        try {
            return clr.loadClassWithout(without, className);
        } catch (ClassNotFoundException e) {
            // OK : Try with next one...
        }
    }
    throw new ClassNotFoundException(className);
}
 
Example 20
Source File: MLet.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private synchronized void setMBeanServer(final MBeanServer server) {
    this.server = server;
    PrivilegedAction<ClassLoaderRepository> act =
        new PrivilegedAction<ClassLoaderRepository>() {
            public ClassLoaderRepository run() {
                return server.getClassLoaderRepository();
            }
        };
    currentClr = AccessController.doPrivileged(act);
}