Package org.glassfish.api.monitoring

Examples of org.glassfish.api.monitoring.ContainerMonitoring


        try {
            ConfigSupport.apply(new SingleConfigCode<MonitoringService>() {

                public Object run(MonitoringService param)
                        throws PropertyVetoException, TransactionFailure {
                    ContainerMonitoring newItem = param.createChild(ContainerMonitoring.class);
                    newItem.setName(configElement);
                    param.getContainerMonitoring().add(newItem);
                    return newItem;
                }
            }, monitoringService);
        } catch (TransactionFailure tf) {
View Full Code Here


                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(propName, newEnabled);
                }
            }
            else if (event.getSource() instanceof ContainerMonitoring) {
                ContainerMonitoring cm = (ContainerMonitoring)event.getSource();

                String newEnabled = newVal.toString().toUpperCase(Locale.ENGLISH);
                String oldEnabled = (oldVal == null) ? "OFF" : oldVal.toString().toUpperCase(Locale.ENGLISH);
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, "levelChangeEventReceived",
                                new Object[]{propName, newEnabled, oldEnabled});
                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(cm.getName(), newEnabled);
                }
            }
            else if(event.getSource() instanceof MonitoringService) {
                // we don't want to get fooled because config allows ANY string.
                // e.g. "false" --> "foo" --> "fals" are all NOT changes!
View Full Code Here

                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(propName, newEnabled);
                }
            }
            else if (event.getSource() instanceof ContainerMonitoring) {
                ContainerMonitoring cm = (ContainerMonitoring)event.getSource();

                String newEnabled = newVal.toString().toUpperCase(Locale.ENGLISH);
                String oldEnabled = (oldVal == null) ? "OFF" : oldVal.toString().toUpperCase(Locale.ENGLISH);
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, level_change_mesg,
                                new Object[]{propName, newEnabled, oldEnabled});
                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(cm.getName(), newEnabled);
                }
            }
            else if(event.getSource() instanceof MonitoringService) {
                // we don't want to get fooled because config allows ANY string.
                // e.g. "false" --> "foo" --> "fals" are all NOT changes!
View Full Code Here

                if (!newEnabled.equals(oldEnabled)) {
                    handleLevelChange(propName, newEnabled);
                }
            }
            else if (event.getSource() instanceof ContainerMonitoring) {
                ContainerMonitoring cm = (ContainerMonitoring)event.getSource();

                String newEnabled = newVal.toString().toUpperCase(Locale.ENGLISH);
                String oldEnabled = (oldVal == null) ? "OFF" : oldVal.toString().toUpperCase(Locale.ENGLISH);
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, level_change_mesg,
                                new Object[]{propName, newEnabled, oldEnabled});
                if (!newEnabled.equals(oldEnabled)) {
                    handleLevelChange(cm.getName(), newEnabled);
                }
            }
            else if(event.getSource() instanceof MonitoringService) {
                // we don't want to get fooled because config allows ANY string.
                // e.g. "false" --> "foo" --> "fals" are all NOT changes!
View Full Code Here


    static boolean setContainerMonitoringLevel(MonitoringService ms,
        final String moduleName, final String level, final ActionReport report) {

        ContainerMonitoring cm = ms.getContainerMonitoring(moduleName);
        if (cm == null) {
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            ActionReport.MessagePart part = report.getTopMessagePart().addChild();
            part.setMessage(localStrings.getLocalString("invalid.module",
                "Invalid module name {0}", moduleName));
View Full Code Here

                if (!newEnabled.equals(oldEnabled)) {
                    handleLevelChange(propName, newEnabled);
                }
            }
            else if (event.getSource() instanceof ContainerMonitoring) {
                ContainerMonitoring cm = (ContainerMonitoring)event.getSource();

                String newEnabled = newVal.toString().toUpperCase(Locale.ENGLISH);
                String oldEnabled = (oldVal == null) ? "OFF" : oldVal.toString().toUpperCase(Locale.ENGLISH);
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, level_change_mesg,
                                new Object[]{propName, newEnabled, oldEnabled});
                if (!newEnabled.equals(oldEnabled)) {
                    handleLevelChange(cm.getName(), newEnabled);
                }
            }
            else if(event.getSource() instanceof MonitoringService) {
                // we don't want to get fooled because config allows ANY string.
                // e.g. "false" --> "foo" --> "fals" are all NOT changes!
View Full Code Here

                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(propName, newEnabled);
                }
            }
            else if (event.getSource() instanceof ContainerMonitoring) {
                ContainerMonitoring cm = (ContainerMonitoring)event.getSource();

                String newEnabled = newVal.toString().toUpperCase();
                String oldEnabled = (oldVal == null) ? "OFF" : oldVal.toString().toUpperCase();
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, "levelChangeEventReceived",
                                new Object[]{propName, newEnabled, oldEnabled});
                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(cm.getName(), newEnabled);
                }
            }
            else if(event.getSource() instanceof MonitoringService) {
                // we don't want to get fooled because config allows ANY string.
                // e.g. "false" --> "foo" --> "fals" are all NOT changes!
View Full Code Here

    private void createConfigElement(final String configElement) {
        try {
            ConfigSupport.apply(new SingleConfigCode<MonitoringService>() {
                public Object run(MonitoringService param)
                        throws PropertyVetoException, TransactionFailure {
                    ContainerMonitoring newItem = param.createChild(ContainerMonitoring.class);
                    newItem.setName(configElement);
                    param.getContainerMonitoring().add(newItem);
                    return newItem;
                }
            }, monitoringService);
        }
View Full Code Here

                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(propName, newEnabled);
                }
            }
            else if (event.getSource() instanceof ContainerMonitoring) {
                ContainerMonitoring cm = (ContainerMonitoring)event.getSource();

                String newEnabled = newVal.toString().toUpperCase(Locale.ENGLISH);
                String oldEnabled = (oldVal == null) ? "OFF" : oldVal.toString().toUpperCase(Locale.ENGLISH);
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, level_change_mesg,
                                new Object[]{propName, newEnabled, oldEnabled});
                if ((!newEnabled.equals(oldEnabled)) && (spr != null)) {
                    handleLevelChange(cm.getName(), newEnabled);
                }
            }
            else if(event.getSource() instanceof MonitoringService) {
                // we don't want to get fooled because config allows ANY string.
                // e.g. "false" --> "foo" --> "fals" are all NOT changes!
View Full Code Here

                if (!newEnabled.equals(oldEnabled)) {
                    handleLevelChange(propName, newEnabled);
                }
            }
            else if (event.getSource() instanceof ContainerMonitoring) {
                ContainerMonitoring cm = (ContainerMonitoring)event.getSource();

                String newEnabled = newVal.toString().toUpperCase(Locale.ENGLISH);
                String oldEnabled = (oldVal == null) ? "OFF" : oldVal.toString().toUpperCase(Locale.ENGLISH);
                if (logger.isLoggable(Level.FINE))
                    logger.log(Level.FINE, level_change_mesg,
                                new Object[]{propName, newEnabled, oldEnabled});
                if (!newEnabled.equals(oldEnabled)) {
                    handleLevelChange(cm.getName(), newEnabled);
                }
            }
            else if(event.getSource() instanceof MonitoringService) {
                // we don't want to get fooled because config allows ANY string.
                // e.g. "false" --> "foo" --> "fals" are all NOT changes!
View Full Code Here

TOP

Related Classes of org.glassfish.api.monitoring.ContainerMonitoring

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.