You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2007/06/27 20:26:13 UTC

svn commit: r551254 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedServlet.java

Author: taylor
Date: Wed Jun 27 11:26:12 2007
New Revision: 551254

URL: http://svn.apache.org/viewvc?view=rev&rev=551254
Log:
https://issues.apache.org/jira/browse/JS2-739
during load testing, we logged 20+ threads waiting on this piece of code in a JVM snapshot with 200 thread load
moving getComponent call, since it seems to synchronize and be in a bottleneck 

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedServlet.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedServlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedServlet.java?view=diff&rev=551254&r1=551253&r2=551254
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedServlet.java (original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/engine/JetspeedServlet.java Wed Jun 27 11:26:12 2007
@@ -87,7 +87,8 @@
      * The Jetspeed Engine
      */
     private static Engine engine;
-
+    private static RequestContextComponent contextComponent;
+    
     private static String webappRoot;
 
     // -------------------------------------------------------------------
@@ -157,7 +158,7 @@
                 Jetspeed.setEngine(engine);
                 engine.start();                
                 console.info("JetspeedServlet has successfuly started the Jetspeed Portal Engine....");
-
+                contextComponent = (RequestContextComponent) Jetspeed.getComponentManager().getComponent(RequestContextComponent.class);
             }
             catch (Throwable e)
             {
@@ -237,8 +238,6 @@
                 res.setHeader("Expires", "0");                               // HTTP/1.0 browser/proxy
 
                 // send request through pipeline
-                RequestContextComponent contextComponent = (RequestContextComponent) Jetspeed.getComponentManager()
-                        .getComponent(RequestContextComponent.class);
                 RequestContext context = contextComponent.create(req, res, getServletConfig());
                 engine.service(context);
                 contextComponent.release(context);



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org