Package com.sun.enterprise.web.stats

Examples of com.sun.enterprise.web.stats.PWCRequestStatsImpl


     * Register http-listener monitoring statistics.
     */
    protected void enableHttpListenerMonitoring(VirtualServer virtualServer,
            int port, String httpListenerId){
           
        PWCRequestStatsImpl pwcRequestStatsImpl =
                virtualServer.getPWCRequestStatsImpl();
       
        if ( pwcRequestStatsImpl == null ){
            pwcRequestStatsImpl = new PWCRequestStatsImpl(
                    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");
            msg = MessageFormat.format(
View Full Code Here


            _logger.log(Level.WARNING,
                        "Unable to register PWCVirtualServerStats for "
                        + vs.getID(), e);
        }

        PWCRequestStatsImpl pwcRequestStatsImpl =
                new PWCRequestStatsImpl(sc.getDefaultDomainName())
        vs.setPWCRequestStatsImpl(pwcRequestStatsImpl);
       
        try {
            monitoringRegistry.registerPWCRequestStats(pwcRequestStatsImpl,
                        vs.getID(),
View Full Code Here

TOP

Related Classes of com.sun.enterprise.web.stats.PWCRequestStatsImpl

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.