private @NotNull ManagedObjectManager createMOMLoop(final String rootName, final int unique) { final boolean isFederated = AMXGlassfish.getGlassfishVersion() != null; ManagedObjectManager mom = createMOM(isFederated); mom = initMOM(mom); mom = createRoot(mom, rootName, unique); return mom; }
final String contextPath = getContextPath(endpoint); if (contextPath != null) { rootName = contextPath + "-" + rootName; return disabled("This endpoint", rootName); return disabled("Global endpoint", rootName); return createMOMLoop(rootName, 0); endpointMonitoring = propertyToSetting(monitorProperty + "endpoint"); clientMonitoring = propertyToSetting(monitorProperty + "client");
return disabled("This client", rootName); } else if (assertion.monitoringAttribute() == Setting.ON && clientMonitoring != Setting.OFF) { return createMOMLoop(rootName, 0); clientMonitoring == Setting.OFF) return disabled("Global client", rootName); return createMOMLoop(rootName, 0);
private @NotNull ManagedObjectManager createMOM(final boolean isFederated) { try { return new RewritingMOM(isFederated ? ManagedObjectManagerFactory.createFederated( AMXGlassfish.DEFAULT.serverMon(AMXGlassfish.DEFAULT.dasName())) : ManagedObjectManagerFactory.createStandalone("com.sun.metro")); } catch (Throwable t) { if (isFederated) { logger.log(Level.CONFIG, "Problem while attempting to federate with GlassFish AMX monitoring. Trying standalone.", t); return createMOM(false); } else { logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t); return ManagedObjectManagerFactory.createNOOP(); } } }
return createMOMLoop(rootName, ++unique); } catch (Throwable t) { logger.log(Level.WARNING, "Error while creating monitoring root with name: " + rootName, t);
final String contextPath = getContextPath(endpoint); if (contextPath != null) { rootName = contextPath + "-" + rootName; return disabled("This endpoint", rootName); return disabled("Global endpoint", rootName); return createMOMLoop(rootName, 0); endpointMonitoring = propertyToSetting(monitorProperty + "endpoint"); clientMonitoring = propertyToSetting(monitorProperty + "client");
return disabled("This client", rootName); } else if (assertion.monitoringAttribute() == Setting.ON && clientMonitoring != Setting.OFF) { return createMOMLoop(rootName, 0); clientMonitoring == Setting.OFF) return disabled("Global client", rootName); return createMOMLoop(rootName, 0);
private @NotNull ManagedObjectManager createMOM(final boolean isFederated) { try { return new RewritingMOM(isFederated ? ManagedObjectManagerFactory.createFederated( AMXGlassfish.DEFAULT.serverMon(AMXGlassfish.DEFAULT.dasName())) : ManagedObjectManagerFactory.createStandalone("com.sun.metro")); } catch (Throwable t) { if (isFederated) { logger.log(Level.CONFIG, "Problem while attempting to federate with GlassFish AMX monitoring. Trying standalone.", t); return createMOM(false); } else { logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t); return ManagedObjectManagerFactory.createNOOP(); } } }
return createMOMLoop(rootName, ++unique); } catch (Throwable t) { logger.log(Level.WARNING, "Error while creating monitoring root with name: " + rootName, t);
final String contextPath = getContextPath(endpoint); if (contextPath != null) { rootName = contextPath + "-" + rootName; return disabled("This endpoint", rootName); return disabled("Global endpoint", rootName); return createMOMLoop(rootName, 0); endpointMonitoring = propertyToSetting(monitorProperty + "endpoint"); clientMonitoring = propertyToSetting(monitorProperty + "client");
private @NotNull ManagedObjectManager createMOMLoop(final String rootName, final int unique) { final boolean isFederated = AMXGlassfish.getGlassfishVersion() != null; ManagedObjectManager mom = createMOM(isFederated); mom = initMOM(mom); mom = createRoot(mom, rootName, unique); return mom; }
return disabled("This client", rootName); } else if (assertion.monitoringAttribute() == Setting.ON && clientMonitoring != Setting.OFF) { return createMOMLoop(rootName, 0); clientMonitoring == Setting.OFF) return disabled("Global client", rootName); return createMOMLoop(rootName, 0);
private @NotNull ManagedObjectManager createMOM(final boolean isFederated) { try { return new RewritingMOM(isFederated ? ManagedObjectManagerFactory.createFederated( AMXGlassfish.DEFAULT.serverMon(AMXGlassfish.DEFAULT.dasName())) : ManagedObjectManagerFactory.createStandalone("com.sun.metro")); } catch (Throwable t) { if (isFederated) { logger.log(Level.CONFIG, "Problem while attempting to federate with GlassFish AMX monitoring. Trying standalone.", t); return createMOM(false); } else { logger.log(Level.WARNING, "Ignoring exception - starting up without monitoring", t); return ManagedObjectManagerFactory.createNOOP(); } } }
return createMOMLoop(rootName, ++unique); } catch (Throwable t) { logger.log(Level.WARNING, "Error while creating monitoring root with name: " + rootName, t);
private @NotNull ManagedObjectManager createMOMLoop(final String rootName, final int unique) { final boolean isFederated = AMXGlassfish.getGlassfishVersion() != null; ManagedObjectManager mom = createMOM(isFederated); mom = initMOM(mom); mom = createRoot(mom, rootName, unique); return mom; }