Examples of MonitoringRegistry


Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

        "com.sun.enterprise.admin.monitor.registry.spi.MonitoringRegistrationHelper";
        final String METHOD = "getInstance";
        try {
            final Class c = Class.forName(REG_IMPL_CLASS);
            final java.lang.reflect.Method m = c.getMethod(METHOD, (Class[]) null);
            final MonitoringRegistry r = (MonitoringRegistry) m.invoke(c, (Object[]) null);
            return r;
        }
        catch(Throwable t) {
            throw new RuntimeException(t);
        }
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

   
    /**
     * Register the monitor change event listener
     */
    public void registerMonitoringLevelListener() {
        MonitoringRegistry monitoringRegistry =
            ApplicationServer.getServerContext().getMonitoringRegistry();
        monitoringRegistry.registerMonitoringLevelListener(
            this, MonitoredObjectType.HTTP_LISTENER);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

    public void preDeregister() {
        unregisterMonitoringLevelListener();
    }
   
    public void unregisterMonitoringLevelListener() {
        MonitoringRegistry monitoringRegistry =
            ApplicationServer.getServerContext().getMonitoringRegistry();
        monitoringRegistry.unregisterMonitoringLevelListener(this);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

        }
    }
   
   
    public void registerMonitoringLevelEvents() {
        MonitoringRegistry monitoringRegistry =
            WebContainer.getInstance().getServerContext().getMonitoringRegistry();
        monitoringRegistry.registerMonitoringLevelListener(
            this, MonitoredObjectType.HTTP_LISTENER);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

            this, MonitoredObjectType.HTTP_LISTENER);
    }

   
    public void unregisterMonitoringLevelEvents() {
        MonitoringRegistry monitoringRegistry =
            WebContainer.getInstance().getServerContext().getMonitoringRegistry();
        monitoringRegistry.unregisterMonitoringLevelListener(this);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

     * Resets the stats of all web modules.
     */
    public static void resetMonitorStats(EmbeddedWebContainer embedded,
                                         ServerContext serverContext) {

        MonitoringRegistry monitoringRegistry =
            serverContext.getMonitoringRegistry();

        Engine[] engines = embedded.getEngines();           
        for(int h=0; h<engines.length; h++) {
            Container engine = (Container) engines[h];           
            Container[] hosts = engine.findChildren();
            for(int i=0; i<hosts.length; i++) {
                Container nextHost = hosts[i];
                Container [] webModules = nextHost.findChildren();
                for (int j=0; j<webModules.length; j++) {
                    WebModule webModule = (WebModule) webModules[j];
                    if (!webModule.hasWebXml()) {
                        // Ad-hoc module
                        continue;
                    }
                    /*
                     * Standalone webmodules are loaded with the application
                     * name set to the string "null"
                     */
                    String j2eeApp = webModule.getJ2EEApplication();
                    if ("null".equalsIgnoreCase(j2eeApp)) {
                        j2eeApp = null;
                    }
                    WebModuleStats stats =
                        monitoringRegistry.getWebModuleStats(
                            j2eeApp,
                            webModule.getModuleName(),
                            webModule.getPath(),
                            nextHost.getName());
                    if (stats != null) {
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

        if ( getWorkStatsMonitoringLevel() != MonitoringLevel.OFF ) {
            AccessController.doPrivileged( new PrivilegedAction() {
                public Object run() {
                    try {
                        ServerContext ctxt = ApplicationServer.getServerContext();
                        MonitoringRegistry monRegistry = ctxt.getMonitoringRegistry();
                        String moduleName = ActiveInboundResourceAdapter.this.getModuleName();
                        monRegistry.unregisterConnectorWorkMgmtStats(
                                        ConnectorAdminServiceUtils.getApplicationName(moduleName),
                                        ConnectorAdminServiceUtils.getConnectorModuleName(moduleName),
                                        ConnectorAdminServiceUtils.isJMSRA(moduleName));
                    } catch( Exception mre) {
                       _logger.log( Level.INFO, "poolmon.cannot_unreg",
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

            AccessController.doPrivileged( new PrivilegedAction() {
                public Object run() {
                    try {

                        ServerContext ctxt = ApplicationServer.getServerContext();
                        MonitoringRegistry monRegistry = ctxt.getMonitoringRegistry();
                        String moduleName = ActiveInboundResourceAdapter.this.getModuleName();
                        //@todo :: after MBeans are modified
                        //Dont register system RARs as of now until MBean changes are complete.
                        if (ResourcesUtil.createInstance().belongToSystemRar(moduleName)) {
                            if (!ConnectorAdminServiceUtils.isJMSRA(moduleName)) {
                                return null;
                            }
                        }

                        ConnectorWorkMgmtStatsImpl workstatsimpl =
                            new ConnectorWorkMgmtStatsImpl(ActiveInboundResourceAdapter.this);
                        monRegistry.registerConnectorWorkMgmtStats(
                                   workstatsimpl,
                                   ConnectorAdminServiceUtils.getApplicationName(moduleName),
                                   ConnectorAdminServiceUtils.getConnectorModuleName(moduleName),
                                   ConnectorAdminServiceUtils.isJMSRA(moduleName),
                                   null);
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

        int port;
        HttpService httpService;
       
        ServerContext sc = getServerContext();
        ConfigContext cc = sc.getConfigContext();
        MonitoringRegistry mReg = sc.getMonitoringRegistry();
        try {
            httpService = ServerBeansFactory.getHttpServiceBean(cc);
        } catch(ConfigException ce) {
            _logger.log(Level.WARNING,
                        "Unable to find HttpServiceBean in config",
                        ce);
            return;
        }

        // keep-alive
        try {
            mReg.registerPWCKeepAliveStats(
                new PWCKeepAliveStatsImpl(sc.getDefaultDomainName()),
                null);
        } catch (MonitoringRegistrationException mre) {
            String msg = _logger.getResourceBundle().getString(
                                            "web.monitoringRegistrationError");
            msg = MessageFormat.format(msg,
                                       new Object[] { "PWCKeepAliveStats" });
            _logger.log(Level.WARNING, msg, mre);
        }
       
        // file-cache
        try {
            mReg.registerPWCFileCacheStats(
                new PWCFileCacheStatsImpl(sc.getDefaultDomainName()),null);
        } catch (MonitoringRegistrationException mre) {
            String msg = _logger.getResourceBundle().getString(
                                            "web.monitoringRegistrationError");
            msg = MessageFormat.format(msg,
                                       new Object[] { "PWCFileCacheStats" });
            _logger.log(Level.WARNING, msg, mre);
        }

        // pwc-thread-pool
        try {
            mReg.registerPWCThreadPoolStats(
                new PWCThreadPoolStatsImpl(sc.getDefaultDomainName()),
                null);
        } catch (MonitoringRegistrationException mre) {
            String msg = _logger.getResourceBundle().getString(
                                            "web.monitoringRegistrationError");
            msg = MessageFormat.format(msg,
                                       new Object[] { "PWCThreadPoolStats" });
            _logger.log(Level.WARNING, msg, mre);
        }

        // connection-queue
        try {
            mReg.registerPWCConnectionQueueStats(
                new PWCConnectionQueueStatsImpl(sc.getDefaultDomainName()),
                null);
        } catch (MonitoringRegistrationException mre) {
            String msg = _logger.getResourceBundle().getString(
                                            "web.monitoringRegistrationError");
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.registry.MonitoringRegistry

                    getServerContext().getDefaultDomainName());
            virtualServer.setPWCRequestStatsImpl(pwcRequestStatsImpl);
        }
        HTTPListenerStatsImpl httpStats;
        MonitoringRegistry mReg = getServerContext().getMonitoringRegistry();
        String vsId = virtualServer.getID();
       
        if (isTomcatUsingDefaultDomain()) {
            httpStats = new HTTPListenerStatsImpl(
                    getServerContext().getDefaultDomainName(),port);
        } else {
            httpStats = new HTTPListenerStatsImpl(vsId,port);
        }

        try {
            mReg.registerHttpListenerStats(httpStats, httpListenerId, vsId, null);
            pwcRequestStatsImpl.addHttpListenerStats(httpStats);
        } catch (MonitoringRegistrationException mre) {
            String msg =
                _logger.getResourceBundle().getString(
                    "web.monitoringRegistrationError");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.