portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl PortletDefinitionImpl.java
Date Wed, 23 Mar 2005 22:27:27 GMT
ate         2005/03/23 14:27:27

  Modified:    components/registry/src/java/org/apache/jetspeed/om/portlet/impl
                        PortletDefinitionImpl.java
  Log:
  Resolving http://issues.apache.org/jira/browse/JS2-210:
  Now only use the PortletFactory for classLoader access
  
  Revision  Changes    Path
  1.27      +15 -5     jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
  
  Index: PortletDefinitionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- PortletDefinitionImpl.java	15 Oct 2004 18:44:18 -0000	1.26
  +++ PortletDefinitionImpl.java	23 Mar 2005 22:27:27 -0000	1.27
  @@ -31,6 +31,7 @@
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.components.portletregistry.PortletRegistry;
   import org.apache.jetspeed.components.portletregistry.RegistryException;
  +import org.apache.jetspeed.factory.PortletFactory;
   import org.apache.jetspeed.om.common.GenericMetadata;
   import org.apache.jetspeed.om.common.MutableDescription;
   import org.apache.jetspeed.om.common.MutableDisplayName;
  @@ -93,6 +94,7 @@
        * 
        */
       protected static PortletRegistry registry;
  +    protected static PortletFactory  portletFactory;
       
       private long id;
       private String className;
  @@ -124,7 +126,6 @@
       private MutablePortletApplication app;
   
       protected long appId;
  -    private ClassLoader portletClassLoader;
       private String expirationCache;
   
       /** Metadata property */
  @@ -288,7 +289,11 @@
        */
       public ClassLoader getPortletClassLoader()
       {
  -        return portletClassLoader;
  +        if ( portletFactory != null )
  +        {
  +            return portletFactory.getPortletApplicationClassLoader(app);
  +        }
  +        return null;
       }
   
       /**
  @@ -320,7 +325,8 @@
        */
       public void setPortletClassLoader( ClassLoader loader )
       {
  -        this.portletClassLoader = loader;
  +      // no-op: ClassLoader is only stored in the PortletFactory
  +      ;
       }
   
       /**
  @@ -911,4 +917,8 @@
           PortletDefinitionImpl.registry = registry;
       }
   
  -}
  \ No newline at end of file
  +    public static void setPortletFactory(PortletFactory portletFactory)
  +    {
  +        PortletDefinitionImpl.portletFactory = portletFactory;
  +    }
  +}
  
  
  

---------------------------------------------------------------------
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