portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r587794 - /portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/services/information/InformationProviderServiceImpl.java
Date Wed, 24 Oct 2007 05:33:15 GMT
Author: woonsan
Date: Tue Oct 23 22:33:10 2007
New Revision: 587794

URL: http://svn.apache.org/viewvc?rev=587794&view=rev
Log:
[JS2-785] Parallel Rendering on Websphere 6.1

David's testings found this problem:

java.util.ConcurrentModificationException: concurrent access to HashMap attempted by Thread[WORKER_15,5,Workers]
at java.util.HashMap.onEntry(HashMap.java:205)
at java.util.HashMap.transfer(HashMap.java:510)
at java.util.HashMap.resize(HashMap.java:500)
at java.util.HashMap.addEntry(HashMap.java:800)
at java.util.HashMap.put(HashMap.java:441)
at com.ibm.ws.webcontainer.srt.SRTServletRequest.setAttribute(SRTServletRequest.java:466)
at javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:329)
at org.apache.jetspeed.engine.servlet.ServletRequestImpl.setAttributeInternal(ServletRequestImpl.java:670)
at org.apache.jetspeed.engine.servlet.ServletRequestImpl.setAttribute(ServletRequestImpl.java:647)
at org.apache.jetspeed.services.information.InformationProviderServiceImpl.getDynamicProvider(InformationProviderServiceImpl.java:63)

Invoking request.setAttribute() in InformationProviderServiceImpl should be synchronized.

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/services/information/InformationProviderServiceImpl.java

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/services/information/InformationProviderServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/services/information/InformationProviderServiceImpl.java?rev=587794&r1=587793&r2=587794&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/services/information/InformationProviderServiceImpl.java
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/services/information/InformationProviderServiceImpl.java
Tue Oct 23 22:33:10 2007
@@ -25,6 +25,8 @@
 import org.apache.pluto.services.information.InformationProviderService;
 import org.apache.pluto.services.information.StaticInformationProvider;
 
+import org.apache.jetspeed.aggregator.CurrentWorkerContext;
+
 /**
  * Factory class for getting Information Provider access
  *
@@ -60,7 +62,18 @@
         if (provider == null)
         {
             provider = new DynamicInformationProviderImpl(request, servletConfig);
-            request.setAttribute("org.apache.jetspeed.engine.core.DynamicInformationProvider",
provider);
+            
+            if (CurrentWorkerContext.getParallelRenderingMode())
+            {
+                synchronized (request)
+                {
+                    request.setAttribute("org.apache.jetspeed.engine.core.DynamicInformationProvider",
provider);
+                }
+            }
+            else
+            {
+                request.setAttribute("org.apache.jetspeed.engine.core.DynamicInformationProvider",
provider);
+            }
         }
 
         return provider;



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


Mime
View raw message