felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r1187495 - /felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
Date Fri, 21 Oct 2011 18:45:38 GMT
Author: fmeschbe
Date: Fri Oct 21 18:45:38 2011
New Revision: 1187495

URL: http://svn.apache.org/viewvc?rev=1187495&view=rev
Log:
FELIX-3181 Applied JMX statistcs patch (thanks Justin Edelson)

Modified:
    felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java

Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java?rev=1187495&r1=1187494&r2=1187495&view=diff
==============================================================================
--- felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
(original)
+++ felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyService.java
Fri Oct 21 18:45:38 2011
@@ -25,6 +25,7 @@ import org.mortbay.jetty.security.SslSoc
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.bio.SocketConnector;
+import org.mortbay.jetty.handler.StatisticsHandler;
 import org.mortbay.jetty.nio.SelectChannelConnector;
 import org.mortbay.jetty.servlet.*;
 import org.apache.felix.http.base.internal.DispatcherServlet;
@@ -153,12 +154,6 @@ public final class JettyService
             // HTTP/1.1 requires Date header if possible (it is)
             this.server.setSendDateHeader(true);
 
-            if (this.config.isRegisterMBeans())
-            {
-                this.mbeanServerTracker = new MBeanServerTracker(this.context, this.server);
-                this.mbeanServerTracker.open();
-            }
-
             this.server.addUserRealm(realm);
 
             if (this.config.isUseHttp())
@@ -177,6 +172,13 @@ public final class JettyService
             context.addEventListener(eventDispatcher);
             context.getSessionHandler().addEventListener(eventDispatcher);
             context.addServlet(new ServletHolder(this.dispatcher), "/*");
+            
+            if (this.config.isRegisterMBeans())
+            {
+                this.mbeanServerTracker = new MBeanServerTracker(this.context, this.server);
+                this.mbeanServerTracker.open();
+                context.addHandler(new StatisticsHandler());
+            }
 
             this.server.start();
             SystemLogger.info(message.toString());



Mime
View raw message