portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raph...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages p001.psml
Date Mon, 01 Dec 2003 22:57:15 GMT
raphael     2003/12/01 14:57:15

  Modified:    portal/src/java/org/apache/jetspeed/aggregator Tag:
                        aggregation_1-branch Aggregator.java
                        ContentDispatcher.java PageAggregator.java
                        PortletRenderer.java
               portal/src/java/org/apache/jetspeed/aggregator/impl Tag:
                        aggregation_1-branch ContentDispatcherImpl.java
                        HttpBufferedResponse.java PortletRendererImpl.java
                        RenderingJob.java Worker.java WorkerMonitor.java
               portal/src/java/org/apache/jetspeed/engine/servlet Tag:
                        aggregation_1-branch ServletRequestImpl.java
               portal/src/java/org/apache/jetspeed/request Tag:
                        aggregation_1-branch JetspeedRequestContext.java
                        RequestContext.java
               portal/src/webapp/WEB-INF/conf Tag: aggregation_1-branch
                        jetspeed.properties
               portal/src/webapp/WEB-INF/pages Tag: aggregation_1-branch
                        p001.psml
  Added:       portal/src/java/org/apache/jetspeed/aggregator Tag:
                        aggregation_1-branch ContentDispatcherCtrl.java
  Log:
  - fix basic sequential aggregation
  - enable debug testing
  - first take on tackling parallel rendering issues
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.1   +4 -7      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Aggregator.java
  
  Index: Aggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Aggregator.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- Aggregator.java	18 Oct 2003 19:53:32 -0000	1.2
  +++ Aggregator.java	1 Dec 2003 22:57:14 -0000	1.2.2.1
  @@ -53,15 +53,12 @@
    */
   package org.apache.jetspeed.aggregator;
   
  -
  -
  -
   import org.apache.jetspeed.cps.CommonService;
   import org.apache.jetspeed.exception.JetspeedException;
   import org.apache.jetspeed.request.RequestContext;
   
   /**
  - * This service handles the generation of unique identifiers
  + * This service handles the generation of first step of agregation process
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @version $Id$
  @@ -74,8 +71,8 @@
        * Builds the portlet set defined in the context into a portlet tree.
        *
        * @return Unique Portlet Entity ID
  -     */    
  +     */
       public void build(RequestContext context)
           throws JetspeedException;
  -    
  +
   }
  
  
  
  1.1.2.3   +1 -5      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/ContentDispatcher.java
  
  Index: ContentDispatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/ContentDispatcher.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- ContentDispatcher.java	30 Nov 2003 15:30:32 -0000	1.1.2.2
  +++ ContentDispatcher.java	1 Dec 2003 22:57:14 -0000	1.1.2.3
  @@ -78,8 +78,4 @@
        * hold until it's completely rendered.
        */
       public void include(Fragment fragment, HttpServletRequest req, HttpServletResponse rsp);
  -
  -    public void notify(ObjectID oid);
  -
  -    public HttpServletResponse register(PortletWindow window, RequestContext request);
   }
  
  
  
  1.1.2.2   +107 -52   jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PageAggregator.java
  
  Index: PageAggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PageAggregator.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PageAggregator.java	30 Nov 2003 16:33:17 -0000	1.1.2.1
  +++ PageAggregator.java	1 Dec 2003 22:57:14 -0000	1.1.2.2
  @@ -78,11 +78,33 @@
   public class PageAggregator extends BaseCommonService implements Aggregator
   {
       private final static Log log = LogFactory.getLog(PageAggregator.class);
  +    private final static String DEFAULT_STRATEGY = "strategy.default";
  +
  +    public final static int STRATEGY_SEQUENTIAL = 0;
  +    public final static int STRATEGY_PARALLEL = 1;
  +    private final static String CONFIG_STRATEGY_SEQUENTIAL = "sequential";
  +    private final static String CONFIG_STRATEGY_PARALLEL = "parallel";
  +    private int strategy = STRATEGY_SEQUENTIAL;
   
       /**
        */
       public void init() throws CPSInitializationException
       {
  +        if (isInitialized())
  +        {
  +            return;
  +        }
  +
  +        try
  +        {
  +            initConfiguration();
  +        }
  +        catch (Exception e)
  +        {
  +            log.error("Aggregator: Failed to load Service: " + e);
  +            e.printStackTrace();
  +        }
  +
           setInit(true);
       }
   
  @@ -92,6 +114,19 @@
       {
       }
   
  +    private void initConfiguration() throws CPSInitializationException
  +    {
  +        String defaultStrategy = getConfiguration().getString(DEFAULT_STRATEGY, CONFIG_STRATEGY_SEQUENTIAL);
  +        if (defaultStrategy.equals(CONFIG_STRATEGY_SEQUENTIAL))
  +        {
  +            strategy = STRATEGY_SEQUENTIAL;
  +        }
  +        else if (defaultStrategy.equals(CONFIG_STRATEGY_PARALLEL))
  +        {
  +            strategy = STRATEGY_PARALLEL;
  +        }
  +    }
  +
       /**
        * Builds the portlet set defined in the context into a portlet tree.
        *
  @@ -101,29 +136,37 @@
           throws JetspeedException
       {
   
  -        ProfilerService profiler = (ProfilerService)CommonPortletServices.getPortalService(ProfilerService.SERVICE_NAME);
           PortletRenderer renderer = (PortletRenderer)CommonPortletServices.getPortalService(PortletRenderer.SERVICE_NAME);
  +/*
  +        ProfilerService profiler = (ProfilerService)CommonPortletServices.getPortalService(ProfilerService.SERVICE_NAME);
   
           // retrieve page associated to profile
  -        ProfileLocator locator = null;
  +        Page page = null;
  +
           try
           {
  -             locator = profiler.getProfile(context);
  +            if (context.getPage()!=null)
  +            {
  +                page = context.getPage();
  +            }
  +            else
  +            {
  +                page = profiler.getPage(profiler.getProfile(context));
  +                context.setPage(page);
  +            }
           }
           catch (Exception e)
           {
               throw new JetspeedException("Failed to get Locator from ProfilerService");
           }
   
  -        Page page = profiler.getPage(locator);
           if (null == page)
           {
  -            throw new JetspeedException("Failed to find PSML Page for locator" + locator);
  +            throw new JetspeedException("Failed to find Page for " + profiler.getProfile(context));
           }
  -
  -        //
  -        // Now prepare the state machine initial variables
  -        //
  +*/
  +        //DEBUG CODE: use this to test a specific page
  +        Page page = org.apache.jetspeed.services.page.PageManager.getPage("p001");
   
           //Set default acl
           String acl = page.getAcl();
  @@ -132,15 +175,6 @@
               //TBD get system default acl;
           }
   
  -        // Set default skin for the request in the request attributes
  -        String skin = null;
  -        if (page.getDefaultSkin()!=null)
  -        {
  -            skin = page.getDefaultSkin();
  -        }
  -
  -        context.getRequest().setAttribute("page.skin",skin);
  -
           // Initialize fragment
           Stack stack = new Stack();
           Fragment currentFragment = page.getRootFragment();
  @@ -152,59 +186,80 @@
   
           if (checkAccess(context,(currentFragment.getAcl()!=null)?currentFragment.getAcl():acl, "render"))
           {
  -            // push the children frgaments on the delayed rendering stack
  -            // root fragement is always treated synchronously
  -            for(Iterator i = currentFragment.getFragments().iterator(); i.hasNext();)
  +            if (strategy == STRATEGY_PARALLEL)
               {
  -                Fragment f = (Fragment)i.next();
  -
  -                if (!f.getState().equals("hidden"))
  +                // initializes the rendering stack with root children
  +                // root fragement is always treated synchronously
  +                for(Iterator i = currentFragment.getFragments().iterator(); i.hasNext();)
                   {
  -                    stack.push(i.next());
  -                }
  -            }
  -
  -            // Walk through the Fragment tree, and start rendering "portlet" type
  -            // fragment
  -            while (!stack.isEmpty())
  -            {
  -                currentFragment = (Fragment)stack.pop();
  +                    Fragment f = (Fragment)i.next();
   
  -                if (checkAccess(context,
  -                                ((currentFragment.getAcl()!=null)?currentFragment.getAcl():acl),
  -                                "render"))
  -                {
  -                    if (currentFragment.getType().equals("portlet"))
  +                    if (!"hidden".equals(f.getState()))
                       {
  -                        renderer.render(currentFragment,context);
  +                        stack.push(f);
                       }
  +                }
  +
  +                // Walk through the Fragment tree, and start rendering "portlet" type
  +                // fragment
  +                while (!stack.isEmpty())
  +                {
  +                    currentFragment = (Fragment)stack.pop();
   
  -                    // push the children frgaments on the rendering stack
  -                    for(Iterator i = currentFragment.getFragments().iterator(); i.hasNext();)
  +                    if (checkAccess(context,
  +                                    ((currentFragment.getAcl()!=null)?currentFragment.getAcl():acl),
  +                                    "render"))
                       {
  -                        Fragment f = (Fragment)i.next();
  +                        if (currentFragment.getType().equals("portlet"))
  +                        {
  +                            renderer.render(currentFragment,context);
  +                        }
   
  -                        if (!f.getState().equals("hidden"))
  +                        // push the children frgaments on the rendering stack
  +                        for(Iterator i = currentFragment.getFragments().iterator(); i.hasNext();)
                           {
  -                            stack.push(i.next());
  +                            Fragment f = (Fragment)i.next();
  +
  +                            if (!"hidden".equals(f.getState()))
  +                            {
  +                                stack.push(f);
  +                            }
                           }
                       }
  -                }
  -                else
  -                {
  -                    // Display an access denied message
  +                    else
  +                    {
  +                        log.warn("Access denied RENDER fragment "+currentFragment);
  +                    }
                   }
               }
   
  +            // Retrieves the content dispatcher appropriate for sequential
  +            // or parallel rendering
  +
  +            ContentDispatcher dispatcher = renderer.getDispatcher(context,(strategy==STRATEGY_PARALLEL));
  +
  +/*
               // Now synchronously trigger the rendering of the whole page
               renderer.renderNow(page.getRootFragment(),context);
  +*/
  +
  +            // DEBUG Testing: Use ContentDispatcher to display all children
  +            // of root fragment
  +
  +            for(Iterator i = page.getRootFragment().getFragments().iterator(); i.hasNext();)
  +            {
  +                Fragment f = (Fragment)i.next();
  +
  +                if (!"hidden".equals(f.getState()))
  +                {
  +                    dispatcher.include(f,context.getRequest(),context.getResponse());
  +                }
  +            }
           }
           else
           {
  -            // generate access denied error message
  +            log.warn("Access denied RENDER page "+page);
           }
  -
  -        context.getRequest().removeAttribute("page.skin");
       }
   
       public boolean checkAccess(RequestContext context, String acl, String action)
  
  
  
  1.1.2.2   +11 -3     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PortletRenderer.java
  
  Index: PortletRenderer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PortletRenderer.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PortletRenderer.java	29 Nov 2003 23:00:01 -0000	1.1.2.1
  +++ PortletRenderer.java	1 Dec 2003 22:57:14 -0000	1.1.2.2
  @@ -53,6 +53,8 @@
    */
   package org.apache.jetspeed.aggregator;
   
  +import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpServletResponse;
   import org.apache.jetspeed.cps.CommonService;
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.request.RequestContext;
  @@ -69,7 +71,7 @@
   public interface PortletRenderer extends CommonService
   {
       /** The name of this service */
  -    public String SERVICE_NAME = "renderer";
  +    public String SERVICE_NAME = "PortletRenderer";
   
       /**
           Render the specified Page fragment.
  @@ -77,6 +79,12 @@
        */
       public void renderNow(Fragment fragment, RequestContext request);
   
  +    /**
  +        Render the specified Page fragment.
  +        Result is returned in the PortletResponse.
  +     */
  +    public void renderNow(Fragment fragment, HttpServletRequest request, HttpServletResponse response);
  +
       /** Render the specified Page fragment.
           The method returns before rendering is complete, rendered content can be
           accessed through the ContentDispatcher
  @@ -86,6 +94,6 @@
       /**
        * Retrieve the ContentDispatcher for the specified request
        */
  -    public ContentDispatcher getDispatcher(RequestContext request);
  +    public ContentDispatcher getDispatcher(RequestContext request, boolean isParallel);
   
   }
  
  
  
  No                   revision
  
  Index: PortletRenderer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PortletRenderer.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PortletRenderer.java	29 Nov 2003 23:00:01 -0000	1.1.2.1
  +++ PortletRenderer.java	1 Dec 2003 22:57:14 -0000	1.1.2.2
  @@ -53,6 +53,8 @@
    */
   package org.apache.jetspeed.aggregator;
   
  +import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpServletResponse;
   import org.apache.jetspeed.cps.CommonService;
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.request.RequestContext;
  @@ -69,7 +71,7 @@
   public interface PortletRenderer extends CommonService
   {
       /** The name of this service */
  -    public String SERVICE_NAME = "renderer";
  +    public String SERVICE_NAME = "PortletRenderer";
   
       /**
           Render the specified Page fragment.
  @@ -77,6 +79,12 @@
        */
       public void renderNow(Fragment fragment, RequestContext request);
   
  +    /**
  +        Render the specified Page fragment.
  +        Result is returned in the PortletResponse.
  +     */
  +    public void renderNow(Fragment fragment, HttpServletRequest request, HttpServletResponse response);
  +
       /** Render the specified Page fragment.
           The method returns before rendering is complete, rendered content can be
           accessed through the ContentDispatcher
  @@ -86,6 +94,6 @@
       /**
        * Retrieve the ContentDispatcher for the specified request
        */
  -    public ContentDispatcher getDispatcher(RequestContext request);
  +    public ContentDispatcher getDispatcher(RequestContext request, boolean isParallel);
   
   }
  
  
  
  No                   revision
  
  Index: PortletRenderer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PortletRenderer.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- PortletRenderer.java	29 Nov 2003 23:00:01 -0000	1.1.2.1
  +++ PortletRenderer.java	1 Dec 2003 22:57:14 -0000	1.1.2.2
  @@ -53,6 +53,8 @@
    */
   package org.apache.jetspeed.aggregator;
   
  +import javax.servlet.http.HttpServletRequest;
  +import javax.servlet.http.HttpServletResponse;
   import org.apache.jetspeed.cps.CommonService;
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.request.RequestContext;
  @@ -69,7 +71,7 @@
   public interface PortletRenderer extends CommonService
   {
       /** The name of this service */
  -    public String SERVICE_NAME = "renderer";
  +    public String SERVICE_NAME = "PortletRenderer";
   
       /**
           Render the specified Page fragment.
  @@ -77,6 +79,12 @@
        */
       public void renderNow(Fragment fragment, RequestContext request);
   
  +    /**
  +        Render the specified Page fragment.
  +        Result is returned in the PortletResponse.
  +     */
  +    public void renderNow(Fragment fragment, HttpServletRequest request, HttpServletResponse response);
  +
       /** Render the specified Page fragment.
           The method returns before rendering is complete, rendered content can be
           accessed through the ContentDispatcher
  @@ -86,6 +94,6 @@
       /**
        * Retrieve the ContentDispatcher for the specified request
        */
  -    public ContentDispatcher getDispatcher(RequestContext request);
  +    public ContentDispatcher getDispatcher(RequestContext request, boolean isParallel);
   
   }
  
  
  
  1.1.2.1   +84 -0     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/ContentDispatcherCtrl.java
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.3   +51 -13    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/ContentDispatcherImpl.java
  
  Index: ContentDispatcherImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/ContentDispatcherImpl.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- ContentDispatcherImpl.java	30 Nov 2003 15:30:33 -0000	1.1.2.2
  +++ ContentDispatcherImpl.java	1 Dec 2003 22:57:14 -0000	1.1.2.3
  @@ -63,6 +63,9 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.aggregator.ContentDispatcher;
  +import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
  +import org.apache.jetspeed.aggregator.PortletRenderer;
  +import org.apache.jetspeed.cps.CommonPortletServices;
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.request.RequestContext;
   import org.apache.jetspeed.util.JetspeedObjectID;
  @@ -77,13 +80,24 @@
    * @author <a href="mailto:raphael@apache.org">RaphaŽl Luta</a>
    * @version $Id$
    */
  -public class ContentDispatcherImpl implements ContentDispatcher
  +public class ContentDispatcherImpl implements ContentDispatcher, ContentDispatcherCtrl
   {
       /** Commons logging */
       protected final static Log log = LogFactory.getLog(ContentDispatcherImpl.class);
   
       private Map contents = new Hashtable();
   
  +    private boolean isParallel = true;
  +
  +    public ContentDispatcherImpl()
  +    {
  +    }
  +
  +    public ContentDispatcherImpl(boolean isParallel)
  +    {
  +        this.isParallel = isParallel;
  +    }
  +
       /**
        * Include in the provided PortletResponse output stream the rendered content
        * of the request fragment.
  @@ -94,6 +108,17 @@
       {
           ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
   
  +        log.debug("Including content for OID "+ oid);
  +
  +        // If we work synchronously, call Renderer.renderNow
  +        if (!isParallel)
  +        {
  +            log.debug("Synchronous rendering for OID "+ oid);
  +            PortletRenderer renderer = (PortletRenderer)CommonPortletServices.getPortalService(PortletRenderer.SERVICE_NAME);
  +            renderer.renderNow(fragment,req,rsp);
  +            return;
  +        }
  +
           PortletContent content = (PortletContent)contents.get(oid);
   
           if (content!=null)
  @@ -102,7 +127,7 @@
               {
                   if (!content.isComplete())
                   {
  -                    log.debug("Waiting for content of fragment "+oid);
  +                    log.debug("Waiting for content OID "+oid);
                       try
                       {
                           content.wait();
  @@ -110,37 +135,39 @@
                       catch (InterruptedException e)
                       {
                       }
  -                    log.debug("Been notified that content "+oid+" is complete");
  +                    log.debug("Been notified that OID "+oid+" is complete");
                   }
  +                log.debug("Content OID "+oid+": "+new String(content.toByteArray()));
               }
   
               try
               {
                   try
                   {
  -                    rsp.getWriter().write(new String(content.toByteArray(),
  -                                                     rsp.getCharacterEncoding())
  -                                         );
  -
  +                    rsp.getWriter().write(content.toString(rsp.getCharacterEncoding()));
                   }
                   catch (IllegalStateException e)
                   {
  -                    rsp.getOutputStream().write(content.toByteArray());
  +                    content.writeTo(rsp.getOutputStream());
                   }
               }
               catch (Exception e)
               {
  -                log.error("Unable to include content "+oid+" in response object", e);
  +                log.error("Unable to include content OID "+oid+" in response object", e);
               }
               finally
               {
                   synchronized(contents)
                   {
  -                    log.debug("Removing content "+oid);
  +                    log.debug("Removing content OID "+oid);
                       contents.remove(oid);
                   }
               }
           }
  +        else
  +        {
  +            log.debug("Content is null for OID "+oid);
  +        }
       }
   
       public void notify(ObjectID oid)
  @@ -151,13 +178,14 @@
           {
               synchronized (content)
               {
  +                log.debug("Notifying complete OID "+oid);
                   content.setComplete(true);
                   content.notifyAll();
               }
           }
       }
   
  -    public HttpServletResponse register(PortletWindow window, RequestContext request)
  +    public HttpServletResponse getResponseForWindow(PortletWindow window, RequestContext request)
       {
           PortletContent myContent = new PortletContent();
   
  @@ -166,7 +194,7 @@
               contents.put(window.getId(),myContent);
           }
   
  -        return new HttpBufferedResponse(request.getResponseForWindow(window),
  +        return new HttpBufferedResponse(request.getResponse(),
                                           myContent.getOutputStream());
       }
   
  @@ -183,6 +211,16 @@
           public ServletOutputStream getOutputStream()
           {
               return os;
  +        }
  +
  +        public String toString(String enc) throws java.io.UnsupportedEncodingException
  +        {
  +            return os.toString(enc);
  +        }
  +
  +        public void writeTo(java.io.OutputStream out) throws java.io.IOException
  +        {
  +            os.writeTo(out);
           }
   
           public byte[] toByteArray()
  
  
  
  1.1.2.2   +38 -0     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/HttpBufferedResponse.java
  
  Index: HttpBufferedResponse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/HttpBufferedResponse.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- HttpBufferedResponse.java	30 Nov 2003 15:30:33 -0000	1.1.2.1
  +++ HttpBufferedResponse.java	1 Dec 2003 22:57:14 -0000	1.1.2.2
  @@ -57,6 +57,8 @@
   import java.io.PrintWriter;
   import java.io.UnsupportedEncodingException;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import javax.servlet.ServletOutputStream;
   import javax.servlet.http.HttpServletResponse;
   
  @@ -65,6 +67,9 @@
       private boolean usingWriter;
       private boolean usingStream;
   
  +    /** Commons logging */
  +    protected final static Log log = LogFactory.getLog(HttpBufferedResponse.class);
  +
       private ServletOutputStream wrappedStream;
       private PrintWriter wrappedWriter;
   
  @@ -84,6 +89,7 @@
   
           usingStream = true;
   
  +        log.debug("getOutputStream: "+wrappedStream);
           return wrappedStream;
       }
   
  @@ -100,8 +106,40 @@
           }
   
           usingWriter = true;
  +        log.debug("getWriter: "+wrappedWriter+ " bytes "
  +                    +((org.apache.jetspeed.util.ByteArrayServletOutputStream)wrappedStream).toByteArray().length);
   
           return wrappedWriter;
       }
   
  +
  +    public void setBufferSize(int size)
  +    {
  +        log.debug("setBufferSize");
  +        // ignore
  +    }
  +
  +    public int getBufferSize()
  +    {
  +        log.debug("getBufferSize");
  +        return 0;
  +    }
  +
  +    public void flushBuffer() throws IOException
  +    {
  +        log.debug("flushBuffer");
  +        wrappedStream.flush();
  +    }
  +
  +    public boolean isCommitted()
  +    {
  +        log.debug("isCommitted");
  +        return false;
  +    }
  +
  +    public void reset()
  +    {
  +        log.debug("reset");
  +        ((org.apache.jetspeed.util.ByteArrayServletOutputStream)wrappedStream).reset();
  +    }
   }
  
  
  
  1.1.2.4   +119 -20   jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/PortletRendererImpl.java
  
  Index: PortletRendererImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/PortletRendererImpl.java,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- PortletRendererImpl.java	30 Nov 2003 16:33:17 -0000	1.1.2.3
  +++ PortletRendererImpl.java	1 Dec 2003 22:57:14 -0000	1.1.2.4
  @@ -61,6 +61,7 @@
   import org.apache.fulcrum.InitializationException;
   import org.apache.jetspeed.aggregator.PortletRenderer;
   import org.apache.jetspeed.aggregator.ContentDispatcher;
  +import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
   import org.apache.jetspeed.aggregator.PortletWindowFactory;
   import org.apache.jetspeed.container.PortletContainerFactory;
   import org.apache.jetspeed.cps.BaseCommonService;
  @@ -69,11 +70,13 @@
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.request.RequestContext;
   import org.apache.jetspeed.services.entity.PortletEntityAccess;
  +import org.apache.jetspeed.services.registry.JetspeedPortletRegistry;
   import org.apache.jetspeed.util.JetspeedObjectID;
   import org.apache.pluto.PortletContainer;
   import org.apache.pluto.PortletContainerException;
   import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.entity.PortletEntity;
  +import org.apache.pluto.om.portlet.PortletDefinition;
   import org.apache.pluto.om.window.PortletWindow;
   
   /**
  @@ -92,12 +95,27 @@
   
       private WorkerMonitor monitor;
   
  +    private PortletContainer container = null;
   
       /**
        */
       public void init() throws InitializationException
       {
           this.monitor = new WorkerMonitor();
  +        this.monitor.init();
  +
  +        try
  +        {
  +            this.container = PortletContainerFactory.getPortletContainer();
  +        }
  +        catch (PortletContainerException e)
  +        {
  +            e.printStackTrace();
  +            log.error("Failed to get PortletContainer: " + e);
  +            return;
  +        }
  +
  +        setInit(true);
       }
   
       /**
  @@ -112,18 +130,6 @@
        */
       public void renderNow(Fragment fragment, RequestContext request)
       {
  -        PortletContainer container;
  -        try
  -        {
  -            container = PortletContainerFactory.getPortletContainer();
  -        }
  -        catch (PortletContainerException e)
  -        {
  -            e.printStackTrace();
  -            log.error("Failed to get PortletContainer: " + e);
  -            return;
  -        }
  -
           //
           // create the portlet window and render the portlet
           //
  @@ -131,9 +137,26 @@
           try
           {
               ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
  -
               PortletEntity portletEntity = PortletEntityAccess.getEntity(oid);
  -            PortletWindow portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  +            PortletWindow portletWindow = null;
  +
  +            if (portletEntity==null)
  +            {
  +                PortletDefinition portletDefinition = JetspeedPortletRegistry.getPortletDefinitionByUniqueName(fragment.getName());
  +                if (portletDefinition == null)
  +                {
  +                    log.error("Failed to load: " + fragment.getName() + " from registry");
  +                }
  +                portletWindow = PortletWindowFactory.getWindow(portletDefinition, fragment.getName());
  +
  +                // fix id
  +                fragment.setId(portletWindow.getId().toString());
  +                oid = portletWindow.getId();
  +            }
  +            else
  +            {
  +                portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  +            }
   
               servletRequest = request.getRequestForWindow(portletWindow);
               HttpServletResponse servletResponse = request.getResponseForWindow(portletWindow);
  @@ -156,6 +179,48 @@
           }
       }
   
  +    /**
  +        Render the specified Page fragment.
  +        Result is returned in the PortletResponse.
  +     */
  +    public void renderNow(Fragment fragment, HttpServletRequest request, HttpServletResponse response)
  +    {
  +        //
  +        // create the portlet window and render the portlet
  +        //
  +        try
  +        {
  +            ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
  +            PortletEntity portletEntity = PortletEntityAccess.getEntity(oid);
  +            PortletWindow portletWindow = null;
  +
  +            if (portletEntity==null)
  +            {
  +                PortletDefinition portletDefinition = JetspeedPortletRegistry.getPortletDefinitionByUniqueName(fragment.getName());
  +                if (portletDefinition == null)
  +                {
  +                    log.error("Failed to load: " + fragment.getName() + " from registry");
  +                }
  +                portletWindow = PortletWindowFactory.getWindow(portletDefinition, fragment.getName());
  +
  +                // fix id
  +                fragment.setId(portletWindow.getId().toString());
  +                oid = portletWindow.getId();
  +            }
  +            else
  +            {
  +                portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  +            }
  +
  +            container.renderPortlet(portletWindow, request, response);
  +        }
  +        catch (Throwable t)
  +        {
  +            t.printStackTrace();
  +            log.error("Failed to service portlet, portlet exception: " + t);
  +        }
  +    }
  +
       /** Render the specified Page fragment.
           The method returns before rendering is complete, rendered content can be
           accessed through the ContentDispatcher
  @@ -166,15 +231,35 @@
   
           ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
           PortletEntity portletEntity = PortletEntityAccess.getEntity(oid);
  -        PortletWindow portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  -        ContentDispatcher dispatcher = getDispatcher(request);
  +        PortletWindow portletWindow = null;
  +
  +        if (portletEntity==null)
  +        {
  +            PortletDefinition portletDefinition = JetspeedPortletRegistry.getPortletDefinitionByUniqueName(fragment.getName());
  +            if (portletDefinition == null)
  +            {
  +                log.error("Failed to load: " + fragment.getName() + " from registry");
  +            }
  +            portletWindow = PortletWindowFactory.getWindow(portletDefinition, fragment.getName());
  +
  +            // fix id
  +            fragment.setId(portletWindow.getId().toString());
  +            oid = portletWindow.getId();
  +        }
  +        else
  +        {
  +            portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  +        }
  +
  +        ContentDispatcherCtrl dispatcher = getDispatcherCtrl(request,true);
   
           HttpServletRequest servletRequest = request.getRequestForWindow(portletWindow);
  -        HttpServletResponse servletResponse = dispatcher.register(portletWindow, request);
  +        HttpServletResponse servletResponse = dispatcher.getResponseForWindow(portletWindow, request);
   
           servletRequest.setAttribute("page.fragment",fragment);
   
           rJob.setWindow(portletWindow);
  +        rJob.setContainer(this.container);
           rJob.setRequest(servletRequest);
           rJob.setResponse(servletResponse);
           rJob.setDispatcher(dispatcher);
  @@ -185,9 +270,23 @@
       /**
        * Retrieve the ContentDispatcher for the specified request
        */
  -    public ContentDispatcher getDispatcher(RequestContext request)
  +    public ContentDispatcher getDispatcher(RequestContext request, boolean isParallel)
       {
  -        return new ContentDispatcherImpl();
  +        return (ContentDispatcher)getDispatcherCtrl(request,isParallel);
  +    }
  +
  +    /**
  +     * Retrieve the ContentDispatcherCtrl for the specified request
  +     */
  +    protected ContentDispatcherCtrl getDispatcherCtrl(RequestContext request, boolean isParallel)
  +    {
  +        if (request.getRequest().getAttribute("dispatcher")==null)
  +        {
  +            log.debug("Creating a new dispatcher and binding to request "+request.getRequest());
  +            request.getRequest().setAttribute("dispatcher",new ContentDispatcherImpl(isParallel));
  +        }
  +
  +        return (ContentDispatcherCtrl)request.getRequest().getAttribute("dispatcher");
       }
   
   }
  
  
  
  1.1.2.3   +20 -25    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/RenderingJob.java
  
  Index: RenderingJob.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/RenderingJob.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- RenderingJob.java	30 Nov 2003 16:33:17 -0000	1.1.2.2
  +++ RenderingJob.java	1 Dec 2003 22:57:14 -0000	1.1.2.3
  @@ -59,11 +59,9 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.apache.jetspeed.aggregator.ContentDispatcher;
  -import org.apache.jetspeed.container.PortletContainerFactory;
  +import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
   import org.apache.jetspeed.exception.JetspeedException;
   import org.apache.pluto.PortletContainer;
  -import org.apache.pluto.PortletContainerException;
   import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.entity.PortletEntity;
   import org.apache.pluto.om.window.PortletWindow;
  @@ -85,7 +83,8 @@
       private PortletWindow window = null;
       private HttpServletRequest request = null;
       private HttpServletResponse response = null;
  -    private ContentDispatcher dispatcher = null;
  +    private ContentDispatcherCtrl dispatcher = null;
  +    private PortletContainer container = null;
   
       public void setWindow(PortletWindow window)
       {
  @@ -117,47 +116,43 @@
           return this.response;
       }
   
  -    public void setDispatcher(ContentDispatcher dispatcher)
  +    public void setDispatcher(ContentDispatcherCtrl dispatcher)
       {
           this.dispatcher = dispatcher;
       }
   
  -    public ContentDispatcher getDispatcher()
  +    public ContentDispatcherCtrl getDispatcher()
       {
           return this.dispatcher;
       }
   
  +    public void setContainer(PortletContainer container)
  +    {
  +        this.container = container;
  +    }
  +
  +    public PortletContainer getContainer()
  +    {
  +        return this.container;
  +    }
  +
       /**
        * Checks if queue is empty, if not try to empty it by calling
        * the WorkerMonitor. When done, pause until next scheduled scan.
        */
       public void run()
       {
  -        PortletContainer container;
  -        try
  -        {
  -            container = PortletContainerFactory.getPortletContainer();
  -        }
  -        catch (PortletContainerException e)
  -        {
  -            e.printStackTrace();
  -            log.error("Failed to get PortletContainer: " + e);
  -            return;
  -        }
  -
           try
           {
  +            log.debug("Rendering OID "+this.window.getId()+" "+ this.request +" "+this.response);
               container.renderPortlet(this.window, this.request, this.response);
  +            log.debug("Notifying dispatcher OID "+this.window.getId());
  +            this.response.flushBuffer();
               dispatcher.notify(this.window.getId());
           }
           catch (Throwable t)
           {
  -            t.printStackTrace();
  -            log.error("Failed to service portlet, portlet exception: " + t);
  -        }
  -        finally
  -        {
  -            this.request.removeAttribute("page.fragment");
  +            log.error("Error rendering portlet OID " + this.window.getId(),t);
           }
       }
   }
  
  
  
  1.1.2.3   +2 -1      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/Worker.java
  
  Index: Worker.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/Worker.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- Worker.java	30 Nov 2003 15:30:33 -0000	1.1.2.2
  +++ Worker.java	1 Dec 2003 22:57:14 -0000	1.1.2.3
  @@ -176,6 +176,7 @@
               {
                   try
                   {
  +                    log.debug("Processing job for window :" + ((RenderingJob)job).getWindow().getId());
                       this.job.run();
                   }
                   catch (Throwable t)
  
  
  
  1.1.2.3   +12 -5     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/WorkerMonitor.java
  
  Index: WorkerMonitor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/WorkerMonitor.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- WorkerMonitor.java	30 Nov 2003 15:30:33 -0000	1.1.2.2
  +++ WorkerMonitor.java	1 Dec 2003 22:57:14 -0000	1.1.2.3
  @@ -80,13 +80,13 @@
       private static long sCount = 0;
   
       /** Minimum number of wokers to create */
  -    private int minWorkers = 10;
  +    private int minWorkers = 5;
   
       /** Maximum number of workers */
       private int maxWorkers = 50;
   
       /** Minimum amount of spare workers */
  -    private int spareWorkers = 5;
  +    private int spareWorkers = 3;
   
       /** Maximum of job processed by a worker before being released */
       private int maxJobsPerWorker = 10;
  @@ -102,6 +102,13 @@
   
       public void init()
       {
  +        addWorkers(this.minWorkers);
  +        setQueue(new FIFOQueue());
  +    }
  +
  +    public void setQueue(Queue queue)
  +    {
  +        this.queue = queue;
       }
   
       /**
  @@ -125,7 +132,7 @@
   
               for (int i = 0; i < wCount; ++i)
               {
  -                Worker worker = new Worker(this, this.tg, "WORKER_" + sCount++);
  +                Worker worker = new Worker(this, this.tg, "WORKER_" + (++sCount));
                   worker.start();
                   workers.push(worker);
               }
  @@ -198,7 +205,7 @@
   
           synchronized (worker)
           {
  -            if (worker.getJobCount()<this.maxJobsPerWorker)
  +            if ((worker.getJobCount()<this.maxJobsPerWorker)&&(queue.size()>0))
               {
                   worker.setJob((RenderingJob)queue.pop());
                   return;
  
  
  
  No                   revision
  No                   revision
  1.4.2.1   +6 -6      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
  
  Index: ServletRequestImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- ServletRequestImpl.java	21 Oct 2003 21:52:02 -0000	1.4
  +++ ServletRequestImpl.java	1 Dec 2003 22:57:14 -0000	1.4.2.1
  @@ -67,7 +67,7 @@
   import org.apache.pluto.om.window.PortletWindow;
   
   /**
  - * This request wrappers the servlet request and is used 
  + * This request wrappers the servlet request and is used
    * within the container to communicate to the invoked servlet.
    *
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @@ -88,7 +88,7 @@
   
           this.portletWindow = window;
           // control = new PortalControlParameter(new PortalURLImpl(servletRequest));
  -		control = new PortalControlParameter(Jetspeed.getCurrentRequestContext().getRequestedPortalURL());
  +        control = new PortalControlParameter(Jetspeed.getCurrentRequestContext().getRequestedPortalURL());
   
       }
   
  @@ -97,7 +97,7 @@
           return (HttpServletRequest) super.getRequest();
       }
   
  -    //	HttpServletRequestWrapper overlay
  +    //  HttpServletRequestWrapper overlay
   
       public String getContentType()
       {
  @@ -109,7 +109,7 @@
           return contentType;
       }
   
  -    //	ServletRequestWrapper overlay
  +    //  ServletRequestWrapper overlay
   
       public String getParameter(String name)
       {
  @@ -136,7 +136,7 @@
   
               }
   
  -            //get request params      
  +            //get request params
               String pid = control.getPIDValue();
               String wid = portletWindow.getId().toString();
               if (pid.equals(wid))
  
  
  
  No                   revision
  No                   revision
  1.4.2.1   +36 -24    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java
  
  Index: JetspeedRequestContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/JetspeedRequestContext.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- JetspeedRequestContext.java	23 Oct 2003 01:45:24 -0000	1.4
  +++ JetspeedRequestContext.java	1 Dec 2003 22:57:14 -0000	1.4.2.1
  @@ -59,6 +59,7 @@
   
   import org.apache.jetspeed.PortalContext;
   import org.apache.jetspeed.om.profile.Profile;
  +import org.apache.jetspeed.om.page.Page;
   import org.apache.jetspeed.services.factory.FactoryManager;
   import org.apache.jetspeed.capability.CapabilityMap;
   import org.apache.jetspeed.engine.core.PortalControlParameter;
  @@ -72,8 +73,8 @@
   
   /**
    * Jetspeed Request Context is associated with each portal request.
  - * The request holds the contextual information shared amongst components 
  - * in the portal, accessed through a common valve pipeline. 
  + * The request holds the contextual information shared amongst components
  + * in the portal, accessed through a common valve pipeline.
    *
    * @author <a href="mailto:david@bluesunrise.com">David Sean Taylor</a>
    * @version $Id$
  @@ -85,6 +86,7 @@
       private HttpServletResponse response;
       private ServletConfig config;
       private Profile profile;
  +    private Page page;
       private PortletDefinition portletDefinition;
   
       private CapabilityMap capabilityMap;
  @@ -98,7 +100,7 @@
   
       /**
        * Create a new Request Context
  -     * 
  +     *
        * @param pc
        * @param request
        * @param response
  @@ -125,8 +127,8 @@
   
       /**
        * The servlet request can always get you back to the Request Context if you need it
  -     * This static accessor provides this capability 
  -     * 
  +     * This static accessor provides this capability
  +     *
        * @param request
        * @return RequestContext
        */
  @@ -165,6 +167,16 @@
           this.profile = profile;
       }
   
  +    public Page getPage()
  +    {
  +        return this.page;
  +    }
  +
  +    public void setPage(Page page)
  +    {
  +        this.page = page;
  +    }
  +
       public PortletDefinition getPortletDefinition()
       {
           return portletDefinition;
  @@ -176,8 +188,8 @@
       }
   
       /** Set the capabilityMap. Used by the CapabilityValve
  -       * 
  -       * @param capabilityMap 
  +       *
  +       * @param capabilityMap
          */
       public void setCapabilityMap(CapabilityMap map)
       {
  @@ -185,7 +197,7 @@
       }
   
       /** get the Capability Map
  -     * 
  +     *
        */
       public CapabilityMap getCapabilityMap()
       {
  @@ -193,8 +205,8 @@
       }
   
       /** Set the Mimetype. Used by the CapabilityValve
  -     * 
  -     * @param mimeType 
  +     *
  +     * @param mimeType
        */
       public void setMimeType(String mimeType)
       {
  @@ -202,7 +214,7 @@
       }
   
       /** get the mimeType for the request
  -     * 
  +     *
        */
       public String getMimeType()
       {
  @@ -210,8 +222,8 @@
       }
   
       /** Set the mediaType. Used by the CapabilityValve
  -     * 
  -     * @param mediaType 
  +     *
  +     * @param mediaType
        */
       public void setMediaType(String mediaType)
       {
  @@ -219,7 +231,7 @@
       }
   
       /** get the Media Type
  -     * 
  +     *
        */
       public String getMediaType()
       {
  @@ -249,7 +261,7 @@
   
       /**
        * Sets the target Portlet Action Window
  -     * 
  +     *
        * @param window
        */
       public void setActionWindow(PortletWindow portletWindow)
  @@ -259,8 +271,8 @@
   
       /**
        * get the character encoding
  -     * 
  -     * 
  +     *
  +     *
        */
       public String getCharacterEncoding()
       {
  @@ -269,19 +281,19 @@
   
       /**
        * set character encoding
  -     * 
  -     * @param enc 
  +     *
  +     * @param enc
        */
       public void setCharacterEncoding(String enc)
       {
           this.encoding = enc;
       }
   
  -    /** 
  +    /**
        * <p>
        * getRequestForWindow
        * </p>
  -     * 
  +     *
        * @see org.apache.jetspeed.request.RequestContext#getRequestForWindow(org.apache.pluto.om.window.PortletWindow)
        * @param window
        * @return
  @@ -294,11 +306,11 @@
           return requestWrapper;
       }
   
  -    /** 
  +    /**
        * <p>
        * getResponseForWindow
        * </p>
  -     * 
  +     *
        * @see org.apache.jetspeed.request.RequestContext#getResponseForWindow(org.apache.pluto.om.window.PortletWindow)
        * @param window
        * @return
  
  
  
  1.3.2.2   +16 -1     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/RequestContext.java
  
  Index: RequestContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/request/RequestContext.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- RequestContext.java	29 Nov 2003 23:00:01 -0000	1.3.2.1
  +++ RequestContext.java	1 Dec 2003 22:57:14 -0000	1.3.2.2
  @@ -62,6 +62,7 @@
   import org.apache.jetspeed.engine.core.PortalControlParameter;
   import org.apache.jetspeed.engine.core.PortalURL;
   import org.apache.jetspeed.om.profile.Profile;
  +import org.apache.jetspeed.om.page.Page;
   import org.apache.pluto.om.window.PortletWindow;
   
   /**
  @@ -118,6 +119,20 @@
        * @param profile The target profile
        */
       public void setProfile(Profile profile);
  +
  +    /**
  +     * Gets the target page for this request
  +     *
  +     * @return Page
  +     */
  +    public Page getPage();
  +
  +    /**
  +     * Sets the target page  for this request
  +     *
  +     * @param page The target page
  +     */
  +    public void setPage(Page page);
   
       /**
        * Set the capabilityMap. Used by the CapabilityValve
  
  
  
  No                   revision
  No                   revision
  1.11.2.1  +9 -3      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/jetspeed.properties
  
  Index: jetspeed.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/jetspeed.properties,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- jetspeed.properties	28 Nov 2003 21:51:50 -0000	1.11
  +++ jetspeed.properties	1 Dec 2003 22:57:15 -0000	1.11.2.1
  @@ -104,8 +104,9 @@
   # -------------------------------------------------------------------
   #  E N G I N E
   # -------------------------------------------------------------------
  -services.Aggregator.classname=org.apache.jetspeed.aggregator.BasicAggregator
  +services.Aggregator.classname=org.apache.jetspeed.aggregator.PageAggregator
   services.Aggregator.strategy.default=sequential
  +services.PortletRenderer.classname=org.apache.jetspeed.aggregator.impl.PortletRendererImpl
   
   # -------------------------------------------------------------------
   #  I D  G E N E R A T O R
  @@ -303,4 +304,9 @@
   # -------------------------------------------------------------------
   # services.PageManager.classname = org.apache.jetspeed.services.page.impl.DatabasePageManagerService
   
  -
  +# -------------------------------------------------------------------
  +# Page Registry (Castor based)            
  +# -------------------------------------------------------------------
  +# services.PageRegistry.classname=org.apache.jetspeed.services.page.impl.CastorXmlPageRegistryService
  +# services.PageRegistry.file=/WEB-INF/pages/pages.xreg
  +# services.PageRegistry.mapping=/WEB-INF/conf/pageregistry-mapping.xml
  \ No newline at end of file
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +5 -5      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p001.psml
  
  Index: p001.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p001.psml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- p001.psml	8 Aug 2003 22:05:55 -0000	1.1
  +++ p001.psml	1 Dec 2003 22:57:15 -0000	1.1.2.1
  @@ -9,19 +9,19 @@
     <fragment id="f001" type="layout" name="TwoColumns">
       <fragment id="pe001" type="portlet" name="HelloPortlet">
         <property layout="TwoColumns" name="row" value="0" />
  -      <property layout="TwoColumns" name="column" value="0" />      
  +      <property layout="TwoColumns" name="column" value="0" />
       </fragment>
       <fragment id="pe002" type="portlet" name="JMXPortlet">
         <property layout="TwoColumns" name="row" value="0" />
  -      <property layout="TwoColumns" name="column" value="1" />      
  +      <property layout="TwoColumns" name="column" value="1" />
       </fragment>
  -    <fragment id="pe003" type="portlet" name="CustomerList">
  +    <fragment id="pe003" type="portlet" name="PreferencePortlet">
         <property layout="TwoColumns" name="row" value="1" />
  -      <property layout="TwoColumns" name="column" value="0" />      
  +      <property layout="TwoColumns" name="column" value="0" />
       </fragment>
       <fragment id="pe004" type="portlet" name="CustomerInfo">
         <property layout="TwoColumns" name="row" value="1" />
  -      <property layout="TwoColumns" name="column" value="1" />      
  +      <property layout="TwoColumns" name="column" value="1" />
       </fragment>
     </fragment>
   </page>
  
  
  

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


Mime
View raw message