weaver      2004/06/10 13:16:48

  Modified:    portal/src/java/org/apache/jetspeed/deployment/impl
                        DeployPortletAppEventListener.java
  Log:
  make sure local portlet apps (like the layouts) have their classloader appended into
  the JetspeedPortletFactory's CL path.
  
  Revision  Changes    Path
  1.10      +10 -1     
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeployPortletAppEventListener.java
  
  Index: DeployPortletAppEventListener.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeployPortletAppEventListener.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DeployPortletAppEventListener.java        9 Jun 2004 16:39:06 -0000       1.9
  +++ DeployPortletAppEventListener.java        10 Jun 2004 20:16:48 -0000      1.10
  @@ -20,8 +20,10 @@
   import org.apache.jetspeed.deployment.DeploymentEventListener;
   import org.apache.jetspeed.deployment.DeploymentException;
   import org.apache.jetspeed.deployment.fs.FSObjectHandler;
  +import org.apache.jetspeed.factory.JetspeedPortletFactory;
   import org.apache.jetspeed.tools.pamanager.PortletApplicationException;
   import org.apache.jetspeed.tools.pamanager.PortletApplicationManagement;
  +import org.apache.jetspeed.util.descriptor.PortletApplicationWar;
   import org.apache.pluto.om.portlet.PortletApplicationDefinition;
   import org.jdom.Document;
   import org.jdom.Element;
  @@ -85,6 +87,11 @@
                           log.info("Portlet application \"" + id + "\"" + " already 
been registered.  Skipping initial deployment.");
                           // still need to register the filename to the app name so 
undeploy works correctly
                                                
appNameToFile.put(handler.getFile().getName(), id);
  +                                             if(isLocal)
  +                                             {
  +                                                 PortletApplicationWar paWar = new 
PortletApplicationWar(handler.getPath(), id, "/"+id, Jetspeed.getDefaultLocale(),  id 
);
  +                              
JetspeedPortletFactory.addClassLoader(paWar.createClassloader(getClass().getClassLoader()));
                                               
  +                                             }
                           return;
                       }
   
  @@ -94,6 +101,8 @@
                       {
                            log.info(handler.getFile().getName()+" will be registered 
as a local portlet applicaiton.");
                            pam.register(id, id, handler.getPath());
  +                         PortletApplicationWar paWar = new 
PortletApplicationWar(handler.getPath(), id, "/"+id, Jetspeed.getDefaultLocale(),  id 
);
  +                         
JetspeedPortletFactory.addClassLoader(paWar.createClassloader(getClass().getClassLoader()));
                       }
                       else
                       {
  
  
  

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

Reply via email to