taylor      2004/08/19 10:28:48

  Modified:    portal/src/java/org/apache/jetspeed/container/url/impl
                        AbstractPortalURL.java
               portal/src/java/org/apache/jetspeed/container/invoker
                        ServletPortletInvoker.java
  Log:
  moved portletdefinition out of request attributes and into thread local
  webloic was trying to serialize any object put in the request attribute that 
originated from a different class loader
  the portlet def is a pretty deep tree of objects, and even if we did make it 
serializable, for performance reasons its best not to serialize/deserialize these
  objects on a per request basis
  
  secondly, webglogic is not returning /jetspeed as the httprequest.getContextPath() 
call from within a Portlet app invoked via a request (cross context) dispatcher
  this is contrary to what is returned from JBoss, Tomcat (4 and 5) cross context 
dispatcher's getContextPath
  i will be debuggin this today
  
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.8       +7 -1      
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java
  
  Index: AbstractPortalURL.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/url/impl/AbstractPortalURL.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AbstractPortalURL.java    3 Jun 2004 16:47:00 -0000       1.7
  +++ AbstractPortalURL.java    19 Aug 2004 17:28:48 -0000      1.8
  @@ -80,6 +80,12 @@
               {
                   contextPath = "";
               }
  +            
  +            // NOTE: i will remove this as soon as I figure out why 
  +            // weblogic is return the PA context instead of the portal context
  +            // will remove it by end of day today
  +            contextPath = "/jetspeed"; 
  +            
               String servletPath = context.getRequest().getServletPath();
               if (servletPath == null)
               {
  
  
  
  1.14      +8 -5      
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
  
  Index: ServletPortletInvoker.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ServletPortletInvoker.java        8 Mar 2004 00:23:31 -0000       1.13
  +++ ServletPortletInvoker.java        19 Aug 2004 17:28:48 -0000      1.14
  @@ -36,6 +36,7 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.container.ContainerConstants;
   import org.apache.jetspeed.container.PortletContextFactory;
  +import org.apache.jetspeed.factory.JetspeedPortletFactoryProxy;
   import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
   import org.apache.pluto.core.impl.PortletConfigImpl;
   import org.apache.pluto.om.portlet.PortletDefinition;
  @@ -196,16 +197,18 @@
   
           try
           {
  +            PortletContext portletContext = 
PortletContextFactory.createPortletContext(appContext, app);
  +            PortletConfig portletConfig = new 
PortletConfigImpl(this.jetspeedConfig, portletContext, portletDefinition);
  +            
               servletRequest.setAttribute(ContainerConstants.METHOD_ID, methodID);
   
               servletRequest.setAttribute(ContainerConstants.PORTLET_REQUEST, 
portletRequest);
               servletRequest.setAttribute(ContainerConstants.PORTLET_RESPONSE, 
portletResponse);
  -            servletRequest.setAttribute(ContainerConstants.PORTLET_ENTITY, 
portletDefinition);
  -
  -            PortletContext portletContext = 
PortletContextFactory.createPortletContext(appContext, app);
  -            PortletConfig portletConfig = new 
PortletConfigImpl(this.jetspeedConfig, portletContext, portletDefinition);
               servletRequest.setAttribute(ContainerConstants.PORTLET_CONFIG, 
portletConfig);
  +            
JetspeedPortletFactoryProxy.setCurrentPortletDefinition(portletDefinition);            
            
  +            
               dispatcher.include(servletRequest, servletResponse);
  +            
           }
           catch (Exception e)
           {
  
  
  

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

Reply via email to