[ http://issues.apache.org/jira/browse/JS2-226?page=all ]

Woonsan Ko updated JS2-226:
---------------------------

    Attachment: JS2-226-diff.txt

Hi David,

My test patches are posted, which make parallel rendering just work.
My patches do not contain timeout, defered rendering, etc.
Here is explanation for my patches.

[Basic idea]
    * Because the request is not thread-safe, in parallel mode, our request 
wrapper needs to store attributes in the worker thread. The worker thread can 
implement java.util.Map interface to allow manipulating attributes.
    * Other thread-unsafe codes can look up attributes from the current worker 
in parallel mode.

[Changes by me]
    * jetspeed-api/.../PortalReservedParameters.java
        - A constant for portlet definition attribute added.
    * jetspeed-api/.../PortletRenderer.java
        - The render method now returns RenderingJob instance, which will be 
used for portlets rendering synchronization.
    * jetspeed-api/.../RenderingJob.java
        - PortletContent getPortletContent() is added. In portlets rendering 
synchronization in AsyncPageAggregatorImpl, portlet content needs to be waited 
until completion.
    * components/portal/.../AsyncPageAggregatorImpl.java
        - I rewrote portlets rendering synchronization.
    * components/portal/.../PortletRendererImpl.java
        - In parallel mode, it stores attributes into rendering job object, and 
the rendering job will pass the attributes to worker when it runs.
    * components/portal/.../WorkerImpl.java
        - It contains attributes map and implements java.util.Map to store and 
allow to manipulate attributes.
    * components/portal/.../RenderingJobImpl.java
        - It passes attributes to the current running worker
        - And it stores portlet definition attribute to reset wrong portlet 
entities.
    * components/portal/.../ServletPortletInvoker.java
        - This class was not thread-safe. It has a member variable for portlet 
definition.
        - So, in parallel mode, portlet definition is looked up from worker now.
        - Also it stores other attributes into worker in parallel mode.
    * components/portal/.../ServletRequestImpl.java
        - This wrapper class can look up and store attributes from worker or 
from servlet request.
    * commons/.../JetspeedContainerServlet.java
        - This servlet was not thread-safe because it looked up portlet 
information from the servlet request.
        - So, this servlet can look up those from worker now.
    * components/portal/.../JetspeedRequestContextComponent.java
        - This component looked up principal from RequestContextComponent, 
which looked up RequestContext from ThreadLocal member. However, in parallel 
mode, the ThreadLocal member is null. So, in parallel mode, it looks up that 
from current running worker.

[Problems remained]
    * Sometimes, some portlet cannot render when page is visited for the first 
time after tomcat starts up. After that, this problem does not occur any more. 
You can find the error message in the tomcat log file. (NoClassDefFoundError...)
    * The portlets in JSF Demo page do not work properly. Sometimes one of 
portlets cannot render with exception. Probably, some attributes are needed for 
JSF portlets.
    * In parallel mode, portlet definition of portlet entity is replaced with 
wrong object, but I could not find the reason. So ServletPortletInvoker checks 
if the portlet definition is wrong and resets.

Thanks for reading.
Any comment welcomed.

> Page Aggregation using STRATEGY_PARALLEL severly broken
> -------------------------------------------------------
>
>                 Key: JS2-226
>                 URL: http://issues.apache.org/jira/browse/JS2-226
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: Aggregation
>    Affects Versions: 2.1
>         Environment: Tomcat 5.0.28
>            Reporter: Ate Douma
>         Assigned To: David Sean Taylor
>            Priority: Critical
>         Attachments: JS2-226-diff.txt
>
>
> While trying to evaluate the status of JS2-17 I tested PageAggregation with 
> PageAggregatorImpl.STRATEGY_PARALLEL and the effect is a total breakdown!
> I'll look into this AFTER the M2 release.
> Not sure if the current problem is related to JS2-17 but I'll check that too.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to