weaver      2004/01/16 11:41:21

  Modified:    portal/src/java/org/apache/jetspeed/deployment/impl
                        DeployPortletAppEventListener.java
  Log:
  deploy event now checks for the existance of the portlet application and skips
  it if it is already registered
  
  Revision  Changes    Path
  1.3       +12 -3     
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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeployPortletAppEventListener.java        15 Jan 2004 23:42:47 -0000      1.2
  +++ DeployPortletAppEventListener.java        16 Jan 2004 19:41:21 -0000      1.3
  @@ -16,6 +16,7 @@
   import org.apache.jetspeed.deployment.DeploymentException;
   import org.apache.jetspeed.deployment.DeploymentHandler;
   import org.apache.jetspeed.deployment.fs.FSObjectHandler;
  +import org.apache.jetspeed.registry.JetspeedPortletRegistry;
   import org.apache.jetspeed.tools.pamanager.Deployment;
   import org.apache.jetspeed.tools.pamanager.FileSystemPAM;
   import org.apache.jetspeed.tools.pamanager.PortletApplicationException;
  @@ -83,7 +84,14 @@
                       if(id == null)
                       {
                                                throw new 
PortletApplicationException("<portlet-app> requires a unique \"id\" attribute.");
  -                    }             
  +                    }
  +                                 
  +                    
if(JetspeedPortletRegistry.getPortletApplicationByIndetifier(id) != null)
  +                    {
  +                                             log.info("Portlet application 
\""+id+"\"" +" already been registered.  Skipping initial deployment.");
  +                                             return;
  +                    }
  +                    
                       log.info("Preparing to deploy portlet app \""+id+"\"");
                       if(dbAalias != null)
                       {
  @@ -100,7 +108,8 @@
               catch (Exception e1)
               {
   
  -                throw new DeploymentException("Error deploying portlet app: " + 
e1.toString(), e1);
  +                String msg = "Error deploying portlet app: " + e1.toString();       
         
  +                throw new DeploymentException(msg, e1);
               }
           }
   
  
  
  

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

Reply via email to