Search in sources :

Example 1 with NoDescriptorRegistry

use of org.apache.meecrowave.tomcat.NoDescriptorRegistry in project meecrowave by apache.

the class Meecrowave method setupJmx.

private void setupJmx(final boolean skip) {
    try {
        final Field registry = Registry.class.getDeclaredField("registry");
        registry.setAccessible(true);
        registry.set(null, skip ? new NoDescriptorRegistry() : new Registry());
    } catch (final Exception e) {
        throw new IllegalStateException(e);
    }
}
Also used : Field(java.lang.reflect.Field) NoDescriptorRegistry(org.apache.meecrowave.tomcat.NoDescriptorRegistry) NoDescriptorRegistry(org.apache.meecrowave.tomcat.NoDescriptorRegistry) Registry(org.apache.tomcat.util.modeler.Registry) LifecycleException(org.apache.catalina.LifecycleException) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException) SAXException(org.xml.sax.SAXException) MalformedURLException(java.net.MalformedURLException)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 Field (java.lang.reflect.Field)1 MalformedURLException (java.net.MalformedURLException)1 LifecycleException (org.apache.catalina.LifecycleException)1 NoDescriptorRegistry (org.apache.meecrowave.tomcat.NoDescriptorRegistry)1 Registry (org.apache.tomcat.util.modeler.Registry)1 SAXException (org.xml.sax.SAXException)1