com.sun.org.glassfish.gmbal.InheritedAttributes Java Examples

The following examples show how to use com.sun.org.glassfish.gmbal.InheritedAttributes. 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: MonitorBase.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}
 
Example #2
Source File: MonitorBase.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}
 
Example #3
Source File: MonitorBase.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}
 
Example #4
Source File: MonitorBase.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}
 
Example #5
Source File: MonitorBase.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}
 
Example #6
Source File: MonitorBase.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}
 
Example #7
Source File: MonitorBase.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}
 
Example #8
Source File: MonitorBase.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private @NotNull ManagedObjectManager initMOM(final ManagedObjectManager mom) {
    try {
        if (typelibDebug != -1) {
            mom.setTypelibDebug(typelibDebug);
        }
        if (registrationDebug.equals("FINE")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.FINE);
        } else if (registrationDebug.equals("NORMAL")) {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NORMAL);
        } else {
            mom.setRegistrationDebug(ManagedObjectManager.RegistrationDebugLevel.NONE);
        }

        mom.setRuntimeDebug(runtimeDebug);

        // Instead of GMBAL throwing an exception and logging
        // duplicate name, just have it return null.
        mom.suppressDuplicateRootReport(true);

        mom.stripPrefix(
            "com.sun.xml.internal.ws.server",
            "com.sun.xml.internal.ws.rx.rm.runtime.sequence");

        // Add annotations to a standard class
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(ManagedData.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(Description.class));
        mom.addAnnotation(javax.xml.ws.WebServiceFeature.class, DummyWebServiceFeature.class.getAnnotation(InheritedAttributes.class));

        // Defer so we can register "this" as root from
        // within constructor.
        mom.suspendJMXRegistration();

    } catch (Throwable t) {
        try {
            mom.close();
        } catch (IOException e) {
            logger.log(Level.CONFIG, "Ignoring exception caught when closing unused ManagedObjectManager", e);
        }
        logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t);
        return ManagedObjectManagerFactory.createNOOP();
    }
    return mom;
}