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/portal/src/java/org/apache/jetspeed/util/descriptor PortletApplicationWar.java
Date Wed, 02 Mar 2005 02:48:58 GMT
ate         2005/03/01 18:48:58

  Modified:    portal/src/java/org/apache/jetspeed/deployment Tag:
                        deployment-refactoring DeploymentManager.java
                        DeploymentEventListener.java DeploymentEvent.java
                        DeploymentObject.java
               portal/src/java/org/apache/jetspeed/deployment/impl Tag:
                        deployment-refactoring
                        DeployDecoratorEventListener.java
                        DeploymentEventImpl.java
                        StandardDeploymentManager.java
                        StandardDeploymentObject.java
                        DeployPortletAppEventListener.java
               portal/src/java/org/apache/jetspeed/util/descriptor Tag:
                        deployment-refactoring PortletApplicationWar.java
  Added:       portal/src/java/org/apache/jetspeed/deployment/impl Tag:
                        deployment-refactoring JarExpander.java
  Log:
  New deployment implementation
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.1   +1 -21     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentManager.java
  
  Index: DeploymentManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentManager.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- DeploymentManager.java	9 Jul 2004 18:24:10 -0000	1.2
  +++ DeploymentManager.java	2 Mar 2005 02:48:57 -0000	1.2.2.1
  @@ -37,16 +37,6 @@
       /**
        * 
        * <p>
  -     * fireUndeploymentEvent
  -     * </p>
  -     * Fires all undeployment events registered to this DeploymentManager.
  -     *
  -     */
  -    void fireUndeploymentEvent();
  -
  -    /**
  -     * 
  -     * <p>
        * dispatch
        * </p>
        * 
  @@ -55,14 +45,4 @@
        * @param event {@link DeploymentEvent} to dispatch.
        */
       void dispatch( DeploymentEvent event );
  -
  -    /**
  -     * 
  -     * <p>
  -     * redeployChangedArtifacts
  -     * </p>
  -     * Fires all redeployment events registered to this DeploymentManager.
  -     *
  -     */
  -    void fireRedeploymentEvent();
  -}
  \ No newline at end of file
  +}
  
  
  
  1.4.2.1   +2 -5      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentEventListener.java
  
  Index: DeploymentEventListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentEventListener.java,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- DeploymentEventListener.java	9 Jul 2004 18:23:50 -0000	1.4
  +++ DeploymentEventListener.java	2 Mar 2005 02:48:57 -0000	1.4.2.1
  @@ -26,9 +26,6 @@
    */
   public interface DeploymentEventListener
   {
  +  public void initialize();
   	public void invokeDeploy(DeploymentEvent event) throws DeploymentException;
  -	
  -	public void invokeUndeploy(DeploymentEvent event) throws DeploymentException;	
  -	
  -	public void invokeRedeploy(DeploymentEvent event) throws DeploymentException;	
   }
  
  
  
  1.5.2.1   +4 -20     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentEvent.java
  
  Index: DeploymentEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentEvent.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- DeploymentEvent.java	2 Jul 2004 14:09:44 -0000	1.5
  +++ DeploymentEvent.java	2 Mar 2005 02:48:57 -0000	1.5.2.1
  @@ -30,23 +30,9 @@
    */
   public interface DeploymentEvent 
   {
  -    /** Standard deployment event */
  -    String EVENT_TYPE_DEPLOY = "deploy";
  -    /** Standard re-deployment event */
  -    String EVENT_TYPE_REDEPLOY = "redeploy";
  -    /** Standard un-deployment event */
  -    String EVENT_TYPE_UNDEPLOY = "undeploy";
  -    
  -    int STATUS_OKAY = 0;
  -	int STATUS_FAILED = 1;
  -    
  -	
  -	/**
  -	 * Returns the type of event this is.  You can use one of the three pre-defined types
  -	 * or use a custom one as event types are freeform.
  -	 * @return String this event's type.
  -	 */
  -	String getEventType();
  +    int STATUS_OKAY = 1;
  +    int STATUS_EVAL = 0;
  +	int STATUS_FAILED = -1;
   	
   	/**
   	 * 
  @@ -85,6 +71,4 @@
   	String getName();
   	
   	String getPath();
  -	
  -	
   }
  
  
  
  1.2.2.1   +4 -12     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentObject.java
  
  Index: DeploymentObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/DeploymentObject.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- DeploymentObject.java	9 Jul 2004 18:24:57 -0000	1.2
  +++ DeploymentObject.java	2 Mar 2005 02:48:57 -0000	1.2.2.1
  @@ -15,11 +15,10 @@
    */
   package org.apache.jetspeed.deployment;
   
  +import java.io.File;
   import java.io.IOException;
   import java.io.InputStream;
   
  -import org.apache.jetspeed.util.FileSystemHelper;
  -
   /**
    * <p>
    * DeploymentObject
  @@ -75,14 +74,7 @@
   	
   	/**
   	 * 
  -	 * <p>
  -	 * getFileObject
  -	 * </p>
  -	 *
  -	 * @return A <code>org.apache.commons.vfs.FileObject</code> that represents the file structure of the
  -	 * object to deploy.  This is usually a LocalFileSystem object or a JarFileSystem object.
  +   * @return the underlying File object
   	 */
  -	FileSystemHelper getFileObject();
  -		
  -
  +	File getFile();
   }
  
  
  
  No                   revision
  No                   revision
  1.7.2.1   +18 -89    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeployDecoratorEventListener.java
  
  Index: DeployDecoratorEventListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeployDecoratorEventListener.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- DeployDecoratorEventListener.java	3 Dec 2004 09:37:59 -0000	1.7
  +++ DeployDecoratorEventListener.java	2 Mar 2005 02:48:58 -0000	1.7.2.1
  @@ -12,7 +12,6 @@
   import java.io.IOException;
   import java.io.InputStream;
   import java.util.ArrayList;
  -import java.util.Iterator;
   import java.util.List;
   
   import org.apache.commons.configuration.PropertiesConfiguration;
  @@ -21,10 +20,6 @@
   import org.apache.jetspeed.deployment.DeploymentEvent;
   import org.apache.jetspeed.deployment.DeploymentEventListener;
   import org.apache.jetspeed.deployment.DeploymentException;
  -import org.apache.jetspeed.deployment.simpleregistry.Entry;
  -import org.apache.jetspeed.deployment.simpleregistry.SimpleRegistry;
  -import org.apache.jetspeed.util.DirectoryHelper;
  -import org.apache.jetspeed.util.FileSystemHelper;
   
   /**
    * <p>
  @@ -40,16 +35,10 @@
   {
       protected static final Log log = LogFactory.getLog("deployment");
   
  -    protected static final String DEPLOYMENT_OBJECT_PATH_ATTR = "DEPLOYMENT_OBJECT_PATH";
  -    protected static final String DEPLOYMENT_CONFIGURATION_ATTR = "DEPLOYMENT_CONFIGURATION";
  -
  -    protected SimpleRegistry registry;
       protected String deployToDir;
   
  -    public DeployDecoratorEventListener(SimpleRegistry registry, String deployToDir) throws IOException
  +    public DeployDecoratorEventListener(String deployToDir) throws IOException
       {
  -        this.registry = registry;
  -
           File checkFile = new File(deployToDir);
           if (checkFile.exists())
           {
  @@ -62,6 +51,11 @@
           }
       }
   
  +    public void initialize()
  +    {
  +        // nothing to do
  +    }
  +
       /**
        * <p>
        * invokeDeploy
  @@ -73,6 +67,7 @@
        */
       public void invokeDeploy(DeploymentEvent event) throws DeploymentException
       {
  +/*      
           // get decorator configuration if available
           PropertiesConfiguration conf = getDecoratorConfiguration(event);
           // silently return if configuration not available, (assumes
  @@ -87,10 +82,6 @@
           if (id != null)
           {
               log.info("Found decorator deployment archive " + id);
  -            Entry entry = new Entry();
  -            entry.setId(id);
  -            entry.setAttribute(DEPLOYMENT_OBJECT_PATH_ATTR, event.getDeploymentObject().getPath());
  -            entry.setAttribute(DEPLOYMENT_CONFIGURATION_ATTR, conf);
   
               FileSystemHelper sourceObject = null;
               FileSystemHelper deployObject = null;
  @@ -105,19 +96,7 @@
                   // skip deployment if initial deployment
                   if (deployPathFile.exists())
                   {
  -                    if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_REDEPLOY))
  -                    {
  -                        invokeUndeploy(event);
  -                    }
  -                    else if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  -                    {
  -                        log.info("Skipping initial deployment of decorator " + id + " to " + deployPath);
  -                        
  -                        // register deployed decorator
  -                        registry.register(entry);
  -                        log.info("Registering decorator " + id);
  -                        return;
  -                    }
  +                  invokeUndeploy(baseDeployPath, id);
                   }
                   
                   // redeploy/deploy decorator w/o META_INF jar metadata
  @@ -175,15 +154,13 @@
                       }
                   }
                   
  -                // register
  -                registry.register(entry);
  -                log.info("Registering decorator " + id);
  -                
  -                log.info("Decorator " + id + " deployed and registered successfuly.");
  +                log.info("Decorator " + id + " deployed successfuly.");
  +                event.setStatus(DeploymentEvent.STATUS_OKAY);
               }
               catch (Exception e)
               {
  -                log.error("Error deploying or registering decorator " + id + ": " + e.toString(), e);
  +                log.error("Error deploying decorator " + id + ": " + e.toString(), e);
  +                event.setStatus(DeploymentEvent.STATUS_FAILED);
               }
               finally
               {
  @@ -205,8 +182,10 @@
           }
           else
           {
  -            log.error("Unable to register directory, \"id\" attribute not defined in configuration");
  +            log.error("Unable to deploy decorator, \"id\" attribute not defined in configuration");
  +            event.setStatus(DeploymentEvent.STATUS_FAILED);
           }
  +*/        
       }
   
       /**
  @@ -218,41 +197,14 @@
        * @param event
        * @throws DeploymentException
        */
  -    public void invokeUndeploy(DeploymentEvent event) throws DeploymentException
  +    public void invokeUndeploy(String baseDeployPath, String id) throws DeploymentException
       {
  -        // get deployment configuration from decorator configuration
  -        // if available or lookup based on registered attributes
  -        PropertiesConfiguration conf = getDecoratorConfiguration(event);
  -        if ((conf == null) && (event.getPath() != null))
  -        {
  -            Iterator registrationsIter = registry.getRegistry().iterator();
  -            while ((conf == null) && registrationsIter.hasNext())
  +/*      
  +        if (baseDeployPath != null && id != null)
               {
  -                Entry entry = (Entry)registrationsIter.next();
  -                String deploymentObjectPath = (String) entry.getAttribute(DEPLOYMENT_OBJECT_PATH_ATTR);
  -                if (event.getPath().equals(deploymentObjectPath))
  -                {
  -                    conf = (PropertiesConfiguration) entry.getAttribute(DEPLOYMENT_CONFIGURATION_ATTR);
  -                }
  -            }
  -        }
  -        // silently return if configuration not available, (assumes
  -        // probably not a decorator)
  -        if (conf == null)
  -        {
  -            return;
  -        }
  -
  -        // process decorator by id
  -        String id = conf.getString("id");
  -        if (id != null)
  -        {
  -            log.info("Found decorator deployment configuration " + id);
  -
               try
               {
                   // find and construct decorator deploy path
  -                String baseDeployPath = getBaseDeployPath(conf);
                   String deployPath = baseDeployPath + File.separator + id;
                   
                   // undeploy decorator
  @@ -283,12 +235,6 @@
                       }
                   }
                   
  -                // deregister
  -                Entry entry = new Entry();
  -                entry.setId(id);
  -                registry.deRegister(entry);
  -                log.info("Deregistering decorator " + id);
  -
                   log.info("Decorator " + id + " undeployed and deregistered successfuly.");
               }
               catch (Exception e)
  @@ -296,24 +242,7 @@
                   log.error("Error undeploying or deregistering decorator " + id + ": " + e.toString(), e);
               }
           }
  -        else
  -        {
  -            log.error("Unable to deregister directory, \"id\" attribute not defined in configuration or configuration not available");
  -        }
  -    }
  -
  -    /**
  -     * <p>
  -     * invokeRedeploy
  -     * </p>
  -     * 
  -     * @see org.apache.jetspeed.deployment.DeploymentEventListener#invokeRedeploy(org.apache.jetspeed.deployment.DeploymentEvent)
  -     * @param event
  -     * @throws DeploymentException
        */
  -    public void invokeRedeploy(DeploymentEvent event) throws DeploymentException
  -    {
  -        invokeDeploy(event);
       }
   
       /**
  
  
  
  1.1.2.1   +5 -18     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeploymentEventImpl.java
  
  Index: DeploymentEventImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeploymentEventImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- DeploymentEventImpl.java	2 Jul 2004 14:08:00 -0000	1.1
  +++ DeploymentEventImpl.java	2 Mar 2005 02:48:58 -0000	1.1.2.1
  @@ -30,11 +30,9 @@
    */
   public class DeploymentEventImpl implements DeploymentEvent
   {
  -	
  -	private String type;
   	private DeploymentObject handler;
   	private String deploymentRoot;
  -	private int status=-1;
  +	private int status = STATUS_EVAL;
   	protected String name;
   	protected String path;
   	
  @@ -42,42 +40,31 @@
       /**
        * 
        */
  -    public DeploymentEventImpl(String type, DeploymentObject handler, String depRoot)
  +    public DeploymentEventImpl(DeploymentObject handler, String depRoot)
       {
           super();
  -        this.type = type;
           this.handler = handler;
           this.deploymentRoot = depRoot;
           this.name = handler.getName();
   		this.path = handler.getPath();       
       }
       
  -	public DeploymentEventImpl(String type, DeploymentObject handler)
  +	public DeploymentEventImpl(DeploymentObject handler)
   	{
   		super();
  -		this.type = type;
   		this.handler = handler;
   		this.name = handler.getName();
   		this.path = handler.getPath();
   	}
   	
  -	public DeploymentEventImpl(String type, String name, String path)
  +	public DeploymentEventImpl(String name, String path)
   	{
   		super();
  -		this.type = type;
   		this.name = name;
   		this.path = path;
   	}
   
       /**
  -     * @see org.apache.jetspeed.deployment.DeploymentEvent#getEventType()
  -     */
  -    public String getEventType()
  -    {        
  -        return this.type;
  -    }
  -
  -    /**
        * @see org.apache.jetspeed.deployment.DeploymentEvent#getDeploymentObject()
        */
       public DeploymentObject getDeploymentObject()
  
  
  
  1.5.2.1   +60 -163   jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java
  
  Index: StandardDeploymentManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentManager.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- StandardDeploymentManager.java	29 Oct 2004 14:18:04 -0000	1.5
  +++ StandardDeploymentManager.java	2 Mar 2005 02:48:58 -0000	1.5.2.1
  @@ -23,8 +23,6 @@
   import java.util.Collection;
   import java.util.HashMap;
   import java.util.Iterator;
  -import java.util.List;
  -import java.util.Map;
   import java.util.StringTokenizer;
   
   import org.apache.commons.logging.Log;
  @@ -63,9 +61,7 @@
   
       protected File[] stagingDirectoriesAsFiles;
   
  -    protected Map fileDates;
  -
  -    protected List deployedFiles;
  +    protected HashMap ignoredFiles;
   
       /**
        * 
  @@ -87,8 +83,7 @@
           }
   
           this.deploymentListeners = deploymentListeners;
  -        this.deployedFiles = new ArrayList();
  -        this.fileDates = new HashMap();
  +        this.ignoredFiles = new HashMap();
       }
   
       /**
  @@ -121,6 +116,13 @@
               }
           }
   
  +        // initialize listeners (where needed)
  +        Iterator itr = deploymentListeners.iterator();
  +        while (itr.hasNext())
  +        {
  +          ((DeploymentEventListener)itr.next()).initialize();
  +        }
  +
           if (scanningDelay > -1)
           {
               try
  @@ -176,8 +178,11 @@
           {
               // check for new deployment
               File aFile = stagedFiles[i];
  -            if (!isDeployed(aFile.getAbsolutePath()))
  +            if (!ignoreFile(aFile))
               {
  +                boolean failed = false;
  +                boolean unknown = false;
  +                
                   DeploymentObject deploymentObject = null;
                   try
                   {
  @@ -187,99 +192,70 @@
                       }
                       catch (FileNotDeployableException e)
                       {
  -                        // log.info(e.getMessage());
  -                        continue;
  +                      unknown = true;
                       }
   
  -                    DeploymentEvent event = new DeploymentEventImpl(DeploymentEvent.EVENT_TYPE_DEPLOY, deploymentObject);
  +                    if ( deploymentObject != null )
  +                    {
  +                      DeploymentEvent event = new DeploymentEventImpl(deploymentObject);
                       dispatch(event);
                       if (event.getStatus() == DeploymentEvent.STATUS_OKAY)
                       {
  -                        deployedFiles.add(aFile.getAbsolutePath());
  -                        // record the lastModified so we can watch for
  -                        // re-deployment
  -                        long lastModified = aFile.lastModified();
  -                        fileDates.put(aFile.getAbsolutePath(), new Long(lastModified));
  +                        if ( aFile.exists() )
  +                        {
  +                          System.err.println("File: "+aFile.getAbsolutePath()+" deployed");
  +                          boolean result = aFile.delete();
  +                          if ( !result )
  +                          {
  +                              System.err.println("Failed to remove aFile: "+aFile);
                       }
  -                    else
  -                    {
  -                        log.error("Error deploying " + aFile.getAbsolutePath());
                       }
  -
                   }
  -                catch (Exception e1)
  +                      else if ( event.getStatus() == DeploymentEvent.STATUS_EVAL )
                   {
  -                    log.error("Error deploying " + aFile.getAbsolutePath(), e1);
  +                        unknown = true;
                   }
  -                finally
  +                      else
                   {
  -                    if (deploymentObject != null)
  +                        failed = true;
  +                      }
  +                    }
  +                    if (failed || unknown)
                       {
  -                        try
  +                      if ( unknown )
                           {
  -                            deploymentObject.close();
  +                        log.warn("Unrecognized file " + aFile.getAbsolutePath());
                           }
  -                        catch (IOException e)
  +                      else
                           {
  -
  +                        log.error("Failure deploying " + aFile.getAbsolutePath());
                           }
  +                      ignoredFiles.put(aFile.getAbsolutePath(), new Long(aFile.lastModified()));
                       }
   
                   }
  +                catch (Exception e1)
  +                {
  +                    log.error("Failure deploying " + aFile.getAbsolutePath(), e1);
  +                    ignoredFiles.put(aFile.getAbsolutePath(), new Long(aFile.lastModified()));
               }
  -        }
  -    }
  -
  -    /**
  -     * 
  -     * <p>
  -     * fireUndeploymentEvent
  -     * </p>
  -     * 
  -     * @see org.apache.jetspeed.deployment.DeploymentManager#fireUndeploymentEvent()
  -     *  
  -     */
  -    public void fireUndeploymentEvent()
  +                finally
       {
  -        List stagedFileList= Arrays.asList(getAllStagedFiles());
  -
  -        for (int i = 0; i < deployedFiles.size(); i++)
  +                    if (deploymentObject != null)
           {
  -            // get a current list of all the files in the deploy directory
  -            String fileName = (String) deployedFiles.get(i);
  -            File aFile = new File(fileName);
  -
  -            // File is still on the file system, so skip it
  -            if (stagedFileList.contains(aFile))
  +                        try
               {
  -                continue;
  +                            deploymentObject.close();
               }
  -
  -            try
  +                        catch (IOException e)
               {
   
  -                DeploymentEvent event = new DeploymentEventImpl(DeploymentEvent.EVENT_TYPE_UNDEPLOY, aFile.getName(),
  -                        aFile.getAbsolutePath());
  -                dispatch(event);
  -
  -                if (event.getStatus() == DeploymentEvent.STATUS_OKAY)
  -                {
  -                    deployedFiles.remove(i);
  -                    fileDates.remove(fileName);
                   }
  -                else
  -                {
  -                    log.error("Error undeploying " + aFile.getAbsolutePath());
                   }
   
               }
  -            catch (Exception e1)
  -            {
  -                log.error("Error undeploying " + aFile.getAbsolutePath(), e1);
               }
  -
           }
  -
       }
   
       /**
  @@ -293,28 +269,17 @@
        */
       public void dispatch( DeploymentEvent event )
       {
  +      try
  +      {
           Iterator itr = deploymentListeners.iterator();
           while (itr.hasNext())
           {
               DeploymentEventListener listener = (DeploymentEventListener) itr.next();
  -            try
  -            {
  -                if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  -                {
                       listener.invokeDeploy(event);
  -                }
  -                else if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_UNDEPLOY))
  -                {
  -                    listener.invokeUndeploy(event);
  -                }
  -                else if (event.getEventType().equals(DeploymentEvent.EVENT_TYPE_REDEPLOY))
  +          if ( event.getStatus() != DeploymentEvent.STATUS_EVAL )
                   {
  -                    listener.invokeRedeploy(event);
  +            break;
                   }
  -
  -                if (event.getStatus() < 0)
  -                {
  -                    event.setStatus(DeploymentEvent.STATUS_OKAY);
                   }
               }
               catch (DeploymentException e)
  @@ -323,97 +288,31 @@
                   event.setStatus(DeploymentEvent.STATUS_FAILED);
               }
           }
  -    }
   
       /**
        * 
        * <p>
  -     * fireReDeploymentEvent
  +     * ignoreFile
        * </p>
        * 
  -     * @see org.apache.jetspeed.deployment.DeploymentManager#fireRedeploymentEvent()
  -     *  
  +     * @param fileName
  +     * @return
        */
  -    public void fireRedeploymentEvent()
  +    protected boolean ignoreFile( File aFile )
       {
  -                
  -        for (int i = 0; i < deployedFiles.size(); i++)
  +      Long previousModified = (Long)ignoredFiles.get(aFile.getAbsolutePath());
  +      if ( previousModified != null )
           {
  -            // get a current list of all the files in the deploy directory
  -            String fileName = (String) deployedFiles.get(i);
  -            File aFile = new File(fileName);
  -
  -            // File is not on the file system, so skip it
  -            Long longDateObj = ((Long) fileDates.get(fileName));
  -            if (longDateObj == null)
  -            {
  -                continue;
  -            }
  -
  -            long lastModifiedDate = longDateObj.longValue();
  -            long currentModifiedDate = aFile.lastModified();
  -
  -            if (currentModifiedDate > lastModifiedDate)
  -            {
  -
  -                DeploymentObject deploymentObject = null;
  -                try
  -                {
  -                    deploymentObject = new StandardDeploymentObject(aFile);
  -                    DeploymentEvent event = new DeploymentEventImpl(DeploymentEvent.EVENT_TYPE_REDEPLOY,
  -                            deploymentObject);
  -                    log.info("Re-deploying " + aFile.getAbsolutePath());
  -                    dispatch(event);
  -
  -                    if (event.getStatus() == DeploymentEvent.STATUS_OKAY)
  +        if ( previousModified.longValue() != aFile.lastModified() )
                       {
  -                        fileDates.put(fileName, new Long(currentModifiedDate));
  +          ignoredFiles.remove(aFile.getAbsolutePath());
                       }
                       else
                       {
  -                        log.error("Error redeploying " + aFile.getAbsolutePath());
  -                    }
  -
  -                }
  -                catch (Exception e1)
  -                {
  -                    log.error("Error undeploying " + aFile.getAbsolutePath(), e1);
  -                }
  -                finally
  -                {
  -                    if (deploymentObject != null)
  -                    {
  -                        try
  -                        {
  -                            // we are responsible for reclaiming the FSObject's
  -                            // resource
  -                            deploymentObject.close();
  -                        }
  -                        catch (IOException e)
  -                        {
  -
  +          return true;
                           }
                       }
  -
  -                }
  -
  -            }
  -        }
  -
  -    }
  -
  -    /**
  -     * 
  -     * <p>
  -     * isDeployed
  -     * </p>
  -     * 
  -     * @param fileName
  -     * @return
  -     */
  -    protected boolean isDeployed( String fileName )
  -    {
  -        return deployedFiles.contains(fileName);
  +      return false;
       }
       
       /**
  @@ -453,8 +352,6 @@
           {
               while (started)
               {
  -                fireUndeploymentEvent();
  -                fireRedeploymentEvent();
                   fireDeploymentEvent();
   
                   try
  @@ -481,4 +378,4 @@
       }
       
   
  -}
  \ No newline at end of file
  +}
  
  
  
  1.1.2.1   +28 -35    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentObject.java
  
  Index: StandardDeploymentObject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/StandardDeploymentObject.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  --- StandardDeploymentObject.java	9 Jul 2004 18:26:45 -0000	1.1
  +++ StandardDeploymentObject.java	2 Mar 2005 02:48:58 -0000	1.1.2.1
  @@ -16,15 +16,12 @@
   package org.apache.jetspeed.deployment.impl;
   
   import java.io.File;
  -import java.io.FileInputStream;
  -import java.io.FileNotFoundException;
   import java.io.IOException;
   import java.io.InputStream;
  +import java.util.zip.ZipEntry;
  +import java.util.zip.ZipFile;
   
   import org.apache.jetspeed.deployment.DeploymentObject;
  -import org.apache.jetspeed.util.DirectoryHelper;
  -import org.apache.jetspeed.util.FileSystemHelper;
  -import org.apache.jetspeed.util.JarHelper;
   
   /**
    * @author scott
  @@ -32,7 +29,8 @@
    */
   public class StandardDeploymentObject implements DeploymentObject
   {
  -    protected FileSystemHelper fsh;
  +    protected File    deploymentObject;
  +    protected ZipFile zipFile;
       
       /**
        * @throws IOException
  @@ -40,15 +38,9 @@
        */
       public StandardDeploymentObject(File deploymentObject) throws IOException, FileNotDeployableException
       {
  -        super();
  -        if(deploymentObject.isDirectory())
  +        if(verifyExtension(deploymentObject))
           {
  -            fsh = new DirectoryHelper(deploymentObject);
  -        }
  -        else if(verifyExtension(deploymentObject))
  -        {
  -            boolean deleteOnClose = !deploymentObject.getName().startsWith("jetspeed-");           
  -            fsh = new JarHelper(deploymentObject, deleteOnClose);
  +          this.deploymentObject = deploymentObject;
           }
           else
           {
  @@ -67,8 +59,11 @@
        */
       public void close() throws IOException
       {
  -        fsh.close();
  -
  +      if ( zipFile != null )
  +      {
  +        zipFile.close();
  +        zipFile = null;
  +      }
       }
   
       /**
  @@ -83,15 +78,14 @@
        */
       public InputStream getConfiguration( String configPath ) throws IOException
       {       
  -        try
  +      ZipFile zipFile = getZipFile();
  +      ZipEntry entry = zipFile.getEntry(configPath);
  +      if ( entry != null )
           {
  -            return new FileInputStream(new File(fsh.getRootDirectory(), configPath));
  +        return zipFile.getInputStream(entry);
           }
  -        catch (FileNotFoundException e)
  -        {
               return null;
           }
  -    }
   
       /**
        * <p>
  @@ -103,7 +97,7 @@
        */
       public String getName()
       {        
  -        return fsh.getRootDirectory().getName();
  +        return deploymentObject.getName();
       }
   
       /**
  @@ -116,20 +110,21 @@
        */
       public String getPath()
       {
  -        return fsh.getSourcePath();
  +        return deploymentObject.getAbsolutePath();
       }
   
  -    /**
  -     * <p>
  -     * getFileObject
  -     * </p>
  -     *
  -     * @see org.apache.jetspeed.deployment.DeploymentObject#getFileObject()
  -     * @return
  -     */
  -    public FileSystemHelper getFileObject()
  +    public ZipFile getZipFile() throws IOException
       {
  -        return fsh;
  +      if ( zipFile == null )
  +      {
  +        zipFile = new ZipFile(deploymentObject);
  +      }
  +      return zipFile;
  +    }
  +
  +    public File getFile()
  +    {
  +      return deploymentObject;
       }
       
       protected boolean verifyExtension(File file)
  @@ -145,8 +140,6 @@
           {
               return false;
           }
  -        
  -       
       }
   
   }
  
  
  
  1.22.2.1  +94 -171   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.22
  retrieving revision 1.22.2.1
  diff -u -r1.22 -r1.22.2.1
  --- DeployPortletAppEventListener.java	3 Feb 2005 09:39:13 -0000	1.22
  +++ DeployPortletAppEventListener.java	2 Mar 2005 02:48:58 -0000	1.22.2.1
  @@ -7,11 +7,12 @@
   package org.apache.jetspeed.deployment.impl;
   
   import java.io.File;
  +import java.io.FileFilter;
   import java.io.FileNotFoundException;
   import java.io.IOException;
  -import java.io.InputStream;
  -import java.util.HashMap;
  -import java.util.Map;
  +import java.net.URL;
  +import java.net.URLClassLoader;
  +import java.util.ArrayList;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -19,14 +20,9 @@
   import org.apache.jetspeed.deployment.DeploymentEvent;
   import org.apache.jetspeed.deployment.DeploymentEventListener;
   import org.apache.jetspeed.deployment.DeploymentException;
  -import org.apache.jetspeed.deployment.DeploymentObject;
  +import org.apache.jetspeed.tools.deploy.JetspeedDeploy;
   import org.apache.jetspeed.tools.pamanager.PortletApplicationManagement;
   import org.apache.jetspeed.util.DirectoryHelper;
  -import org.apache.jetspeed.util.descriptor.PortletApplicationWar;
  -import org.apache.pluto.om.portlet.PortletApplicationDefinition;
  -import org.jdom.Document;
  -import org.jdom.Element;
  -import org.jdom.input.SAXBuilder;
   
   /**
    * <p>
  @@ -43,230 +39,157 @@
   
       protected static final Log log = LogFactory.getLog("deployment");
       private String webAppDir;
  +    private String localAppDir;
       private PortletApplicationManagement pam;
  -    private Map appNameToFile;
  -    protected PortletRegistry registry;
  +    private PortletRegistry registry;
   
       /**
  -     * 
  -     * @param webAppDir
        * @param pam
  -     * @param registry
  +     * @param webAppDir
  +     * @param localAppDir
        * @throws FileNotFoundException
  -     *             the <code>webAppDir</code> directory does not exist.
  +     *             the <code>webAppDir</code> or <code>localAppDir</code> directory does not exist.
        */
  -    public DeployPortletAppEventListener( String webAppDir, PortletApplicationManagement pam,
  -                                          PortletRegistry registry) throws FileNotFoundException
  +    public DeployPortletAppEventListener(PortletApplicationManagement pam, PortletRegistry registry, String webAppDir, String localAppDir) throws FileNotFoundException
       {
  -        File checkFile = new File(webAppDir);
  +        this.pam = pam;
  +        this.registry = registry;
   
  -        if (checkFile.exists())
  +        File webAppDirFile = new File(webAppDir);
  +
  +        if (webAppDirFile.exists())
           {
               this.webAppDir = webAppDir;
           }
           else
           {
               throw new FileNotFoundException("The depoyment directory for portlet applications \""
  -                    + checkFile.getAbsolutePath() + "\" does not exist.");
  +                                            + webAppDirFile.getAbsolutePath() + "\" does not exist.");
           }
  -        this.pam = pam;
  -        this.appNameToFile = new HashMap();
  -        this.registry = registry;
  -    }
  +        File localAppDirFile = new File(localAppDir);
   
  -    /**
  -     * <p>
  -     * doUnDeploy
  -     * </p>
  -     * 
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    public void invokeUndeploy( DeploymentEvent event ) throws DeploymentException
  -    {
  -        String paName = null;
  -        try
  +        if (!localAppDirFile.exists())
           {
  -            String filePath = event.getPath();
  -            paName = (String) appNameToFile.get(filePath);
  -            if (paName == null)
  -            {
  -                return;
  -            }
  -
  -            boolean isLocal = event.getName().startsWith("jetspeed-");
  -
  -            PortletApplicationWar deployedWar = null;
  -
  -            PortletApplicationDefinition pa = registry.getPortletApplicationByIdentifier(paName);
  -            String webAppContextRoot = null;
  -
  -            if (pa != null)
  -            {
  -                webAppContextRoot = pa.getWebApplicationDefinition().getContextRoot();
  -            }
  -            else
  -            {
  -                webAppContextRoot = "/" + paName;
  -            }
  -
  -            if (isLocal)
  +            localAppDirFile.mkdirs();
  +        }
  +        else if (!localAppDirFile.isDirectory())
  +        {
  +            throw new FileNotFoundException("Invalid depoyment directory for local portlet applications: \""
  +                                            + localAppDirFile.getAbsolutePath());
  +        }
  +        this.localAppDir = localAppDir;
  +    }
  +    
  +    public void initialize()
               {
  -                log.info("Preparing to unregister portlet application \"" + paName + "\"");
  -                pam.unregister(paName);
  -            }
  -            else
  +        // start deployed local pa
  +        File[] localApps = new File(localAppDir).listFiles(
  +           new FileFilter() 
  +           {
  +               public boolean accept(File pathname)
               {
  -                log.info("Preparing to undeploy portlet application \"" + paName + "\"");
  -                DirectoryHelper dir = new DirectoryHelper(new File(webAppDir + "/" + paName));
  -                deployedWar = new PortletApplicationWar(dir, paName, webAppContextRoot );
  -                pam.undeploy(deployedWar);
  +                   return pathname.isDirectory() && registry.getPortletApplication(pathname.getName()) != null;
               }
  -
  -            log.info("Portlet application \"" + paName + "\"" + " was successfuly undeployed.");
  -        }
  -        catch (Exception e)
  +           });
  +        for ( int i = 0; i < localApps.length; i++ )
           {
  -            String msg = "Error undeploying portlet app " + paName + ": " + e.toString();
  -            if (e instanceof DeploymentException)
  +            DirectoryHelper paDirHelper = new DirectoryHelper(localApps[i]);
  +            try
               {
  -                throw (DeploymentException) e;
  +                pam.startLocalPortletApplication(localApps[i].getName(), paDirHelper, createLocalPAClassLoader(localApps[i]));
               }
  -            else
  +            catch (Exception e)
               {
  -                throw new DeploymentException(msg, e);
  +                log.error("Failed to start Local Portlet Application "+localApps[i],e);
               }
  -
           }
       }
   
       /**
        * <p>
  -     * doDeploy
  +     * invokeDeploy
        * </p>
        * 
        * @param event
        * @throws DeploymentException
  -     * @throws PortletApplicationException
  -     * @throws IOException
  -     * @throws JDOMException
        */
       public void invokeDeploy( DeploymentEvent event ) throws DeploymentException
       {
  -        doDeploy(event);
  -
  -    }
  -
  -    /**
  -     * <p>
  -     * doDeploy
  -     * </p>
  -     * 
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    protected void doDeploy( DeploymentEvent event ) throws DeploymentException
  +      String fileName = event.getName();
  +      if (fileName.endsWith(".war"))
       {
  -        InputStream portletXmlStream = null;
  -        try
  +        int prefixLength = PortletApplicationManagement.LOCAL_PA_PREFIX.length();
  +        if (fileName.length() > prefixLength && 
  +            fileName.substring(0,prefixLength).equalsIgnoreCase(PortletApplicationManagement.LOCAL_PA_PREFIX))
           {
  -            DeploymentObject deploymentObj = event.getDeploymentObject();
  -            portletXmlStream = deploymentObj.getConfiguration("WEB-INF/portlet.xml");
  -            if (portletXmlStream == null)
  +          deployLocalPortletApplication(event);
  +        }
  +        else
               {
  -                return;
  +          deployPortletApplication(event);
  +        }
               }
  -
  -            String fileName = deploymentObj.getName();
  -            boolean isLocal = fileName.startsWith("jetspeed-");
  -
  -            log.info("Loading portlet application from web archive " + deploymentObj.getPath());
  -            SAXBuilder builder = new SAXBuilder();
  -            Document portletXml = builder.build(portletXmlStream);
  -            Element portletApp = portletXml.getRootElement();
  -            String id = portletApp.getAttributeValue("id");
  -            if (id == null)
  -            {
  -
  -                String warFileName = fileName;
  -                int extensionIdx = warFileName.lastIndexOf(".war");
  -                id = warFileName.substring(0, extensionIdx);
  -                log.info("Application id not defined in portlet.xml so using war name " + id);
               }
   
  -            PortletApplicationWar paWar = new PortletApplicationWar(deploymentObj.getFileObject(), id, "/" + id );
  -            PortletApplicationDefinition pa = registry.getPortletApplicationByIdentifier(id);
  -            boolean registered = (pa != null); 
  -            File deploymentPath = (isLocal ? deploymentObj.getFileObject().getRootDirectory() : new File(pam.getDeploymentPath(id)));
  -            boolean deployed = deploymentPath.exists();
  -            log.info("Portlet application \"" + id + "\"" + ": registered=" + registered + ", deployed=" + deployed);
  -
  -            if (registered && deployed && event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  +    protected void deployPortletApplication(DeploymentEvent event) throws DeploymentException
               {
  -                log.info("Portlet application \"" + id + "\"" + " already registered.  Skipping initial deployment.");
  -                pam.register(paWar);
  -            }
  -            else if (!registered || event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  +      try
               {
  -                if (isLocal)
  -                {
  -                    log.info("Deploying portlet app \"" + id + "\": " + fileName + " will be registered as a local portlet application.");
  -                    pam.register(paWar);
  +          File toFile = new File(webAppDir, event.getName());
  +          new JetspeedDeploy(event.getPath(),toFile.getAbsolutePath());
  +          event.setStatus(DeploymentEvent.STATUS_OKAY);
                   }
  -                else
  +      catch (Exception e)
                   {
  -                    log.info("Deploying portlet app \"" + id + "\": " + "portlet application WAR " + fileName);
  -                    pam.deploy(paWar);
  +          throw new DeploymentException(e);
                   }
               }
  -            else if (deployed || event.getEventType().equals(DeploymentEvent.EVENT_TYPE_REDEPLOY))
  +
  +    protected void deployLocalPortletApplication(DeploymentEvent event) throws DeploymentException
               {
  -                if (isLocal)
  +      try
                   {
  -                    log.error("Redeploying portlet app \"" + id + "\" from " + fileName + " as a local portlet application is not implemented.");
  +        String fileName = event.getName();
  +        String appName = fileName.substring(0,fileName.length()-4);
  +        pam.stopLocalPortletApplication(appName);
  +        File targetDir = new File(localAppDir, appName);
  +        JarExpander.expand(event.getDeploymentObject().getFile(), targetDir);
  +        DirectoryHelper paDirHelper = new DirectoryHelper(targetDir);
  +        pam.startLocalPortletApplication(appName, paDirHelper, createLocalPAClassLoader(targetDir));
  +        event.setStatus(DeploymentEvent.STATUS_OKAY);
                   }
  -                else
  +      catch (Exception e)
                   {
  -                    log.info("Redeploying portlet app \"" + id + "\": " + "portlet application WAR " + fileName);
  -                    pam.redeploy(paWar);
  +        throw new DeploymentException(e);
                   }
               }
  -            appNameToFile.put(deploymentObj.getPath(), id);
   
  -            log.info("Portlet app \"" + id + "\" " + "successfuly (re)deployed.");
  -        }
  -        catch (Exception e)
  +    protected ClassLoader createLocalPAClassLoader(File paDir) throws IOException
  +    {
  +        ArrayList urls = new ArrayList();
  +        File webInfClasses = null;
  +
  +        webInfClasses = new File(paDir, ("WEB-INF/classes/"));
  +        if (webInfClasses.exists())
           {
  -            String msg = "Error (re)deploying portlet app: " + e.toString();
  -            throw new DeploymentException(msg, e);
  +            log.info("Adding " + webInfClasses.toURL() + " to class path for Local PA "+paDir.getName());
  +            urls.add(webInfClasses.toURL());
           }
  -        finally
  +
  +        File webInfLib = new File(paDir, "WEB-INF/lib");
  +
  +        if (webInfLib.exists())
           {
  -            if (portletXmlStream != null)
  -            {
  -                try
  -                {
  -                    portletXmlStream.close();
  -                }
  -                catch (IOException e1)
  +            File[] jars = webInfLib.listFiles();
  +
  +            for (int i = 0; i < jars.length; i++)
                   {
  -                    // ignore
  -                }
  +                File jar = jars[i];
  +                log.info("Adding " + jar.toURL() + " to class path for Local PA "+paDir.getName());
  +                urls.add(jar.toURL());
               }
           }
  +        return new URLClassLoader((URL[]) urls.toArray(new URL[urls.size()]), getClass().getClassLoader());
       }
   
  -    /**
  -     * <p>
  -     * invokeRedeploy
  -     * </p>
  -     * 
  -     * @see org.apache.jetspeed.deployment.DeploymentEventListener#invokeRedeploy(org.apache.jetspeed.deployment.DeploymentEvent)
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    public void invokeRedeploy( DeploymentEvent event ) throws DeploymentException
  -    {
  -        doDeploy(event);
  -    }
   }
  
  
  
  No                   revision
  
  Index: DeployPortletAppEventListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeployPortletAppEventListener.java,v
  retrieving revision 1.22
  retrieving revision 1.22.2.1
  diff -u -r1.22 -r1.22.2.1
  --- DeployPortletAppEventListener.java	3 Feb 2005 09:39:13 -0000	1.22
  +++ DeployPortletAppEventListener.java	2 Mar 2005 02:48:58 -0000	1.22.2.1
  @@ -7,11 +7,12 @@
   package org.apache.jetspeed.deployment.impl;
   
   import java.io.File;
  +import java.io.FileFilter;
   import java.io.FileNotFoundException;
   import java.io.IOException;
  -import java.io.InputStream;
  -import java.util.HashMap;
  -import java.util.Map;
  +import java.net.URL;
  +import java.net.URLClassLoader;
  +import java.util.ArrayList;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -19,14 +20,9 @@
   import org.apache.jetspeed.deployment.DeploymentEvent;
   import org.apache.jetspeed.deployment.DeploymentEventListener;
   import org.apache.jetspeed.deployment.DeploymentException;
  -import org.apache.jetspeed.deployment.DeploymentObject;
  +import org.apache.jetspeed.tools.deploy.JetspeedDeploy;
   import org.apache.jetspeed.tools.pamanager.PortletApplicationManagement;
   import org.apache.jetspeed.util.DirectoryHelper;
  -import org.apache.jetspeed.util.descriptor.PortletApplicationWar;
  -import org.apache.pluto.om.portlet.PortletApplicationDefinition;
  -import org.jdom.Document;
  -import org.jdom.Element;
  -import org.jdom.input.SAXBuilder;
   
   /**
    * <p>
  @@ -43,230 +39,157 @@
   
       protected static final Log log = LogFactory.getLog("deployment");
       private String webAppDir;
  +    private String localAppDir;
       private PortletApplicationManagement pam;
  -    private Map appNameToFile;
  -    protected PortletRegistry registry;
  +    private PortletRegistry registry;
   
       /**
  -     * 
  -     * @param webAppDir
        * @param pam
  -     * @param registry
  +     * @param webAppDir
  +     * @param localAppDir
        * @throws FileNotFoundException
  -     *             the <code>webAppDir</code> directory does not exist.
  +     *             the <code>webAppDir</code> or <code>localAppDir</code> directory does not exist.
        */
  -    public DeployPortletAppEventListener( String webAppDir, PortletApplicationManagement pam,
  -                                          PortletRegistry registry) throws FileNotFoundException
  +    public DeployPortletAppEventListener(PortletApplicationManagement pam, PortletRegistry registry, String webAppDir, String localAppDir) throws FileNotFoundException
       {
  -        File checkFile = new File(webAppDir);
  +        this.pam = pam;
  +        this.registry = registry;
   
  -        if (checkFile.exists())
  +        File webAppDirFile = new File(webAppDir);
  +
  +        if (webAppDirFile.exists())
           {
               this.webAppDir = webAppDir;
           }
           else
           {
               throw new FileNotFoundException("The depoyment directory for portlet applications \""
  -                    + checkFile.getAbsolutePath() + "\" does not exist.");
  +                                            + webAppDirFile.getAbsolutePath() + "\" does not exist.");
           }
  -        this.pam = pam;
  -        this.appNameToFile = new HashMap();
  -        this.registry = registry;
  -    }
  +        File localAppDirFile = new File(localAppDir);
   
  -    /**
  -     * <p>
  -     * doUnDeploy
  -     * </p>
  -     * 
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    public void invokeUndeploy( DeploymentEvent event ) throws DeploymentException
  -    {
  -        String paName = null;
  -        try
  +        if (!localAppDirFile.exists())
           {
  -            String filePath = event.getPath();
  -            paName = (String) appNameToFile.get(filePath);
  -            if (paName == null)
  -            {
  -                return;
  -            }
  -
  -            boolean isLocal = event.getName().startsWith("jetspeed-");
  -
  -            PortletApplicationWar deployedWar = null;
  -
  -            PortletApplicationDefinition pa = registry.getPortletApplicationByIdentifier(paName);
  -            String webAppContextRoot = null;
  -
  -            if (pa != null)
  -            {
  -                webAppContextRoot = pa.getWebApplicationDefinition().getContextRoot();
  -            }
  -            else
  -            {
  -                webAppContextRoot = "/" + paName;
  -            }
  -
  -            if (isLocal)
  +            localAppDirFile.mkdirs();
  +        }
  +        else if (!localAppDirFile.isDirectory())
  +        {
  +            throw new FileNotFoundException("Invalid depoyment directory for local portlet applications: \""
  +                                            + localAppDirFile.getAbsolutePath());
  +        }
  +        this.localAppDir = localAppDir;
  +    }
  +    
  +    public void initialize()
               {
  -                log.info("Preparing to unregister portlet application \"" + paName + "\"");
  -                pam.unregister(paName);
  -            }
  -            else
  +        // start deployed local pa
  +        File[] localApps = new File(localAppDir).listFiles(
  +           new FileFilter() 
  +           {
  +               public boolean accept(File pathname)
               {
  -                log.info("Preparing to undeploy portlet application \"" + paName + "\"");
  -                DirectoryHelper dir = new DirectoryHelper(new File(webAppDir + "/" + paName));
  -                deployedWar = new PortletApplicationWar(dir, paName, webAppContextRoot );
  -                pam.undeploy(deployedWar);
  +                   return pathname.isDirectory() && registry.getPortletApplication(pathname.getName()) != null;
               }
  -
  -            log.info("Portlet application \"" + paName + "\"" + " was successfuly undeployed.");
  -        }
  -        catch (Exception e)
  +           });
  +        for ( int i = 0; i < localApps.length; i++ )
           {
  -            String msg = "Error undeploying portlet app " + paName + ": " + e.toString();
  -            if (e instanceof DeploymentException)
  +            DirectoryHelper paDirHelper = new DirectoryHelper(localApps[i]);
  +            try
               {
  -                throw (DeploymentException) e;
  +                pam.startLocalPortletApplication(localApps[i].getName(), paDirHelper, createLocalPAClassLoader(localApps[i]));
               }
  -            else
  +            catch (Exception e)
               {
  -                throw new DeploymentException(msg, e);
  +                log.error("Failed to start Local Portlet Application "+localApps[i],e);
               }
  -
           }
       }
   
       /**
        * <p>
  -     * doDeploy
  +     * invokeDeploy
        * </p>
        * 
        * @param event
        * @throws DeploymentException
  -     * @throws PortletApplicationException
  -     * @throws IOException
  -     * @throws JDOMException
        */
       public void invokeDeploy( DeploymentEvent event ) throws DeploymentException
       {
  -        doDeploy(event);
  -
  -    }
  -
  -    /**
  -     * <p>
  -     * doDeploy
  -     * </p>
  -     * 
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    protected void doDeploy( DeploymentEvent event ) throws DeploymentException
  +      String fileName = event.getName();
  +      if (fileName.endsWith(".war"))
       {
  -        InputStream portletXmlStream = null;
  -        try
  +        int prefixLength = PortletApplicationManagement.LOCAL_PA_PREFIX.length();
  +        if (fileName.length() > prefixLength && 
  +            fileName.substring(0,prefixLength).equalsIgnoreCase(PortletApplicationManagement.LOCAL_PA_PREFIX))
           {
  -            DeploymentObject deploymentObj = event.getDeploymentObject();
  -            portletXmlStream = deploymentObj.getConfiguration("WEB-INF/portlet.xml");
  -            if (portletXmlStream == null)
  +          deployLocalPortletApplication(event);
  +        }
  +        else
               {
  -                return;
  +          deployPortletApplication(event);
  +        }
               }
  -
  -            String fileName = deploymentObj.getName();
  -            boolean isLocal = fileName.startsWith("jetspeed-");
  -
  -            log.info("Loading portlet application from web archive " + deploymentObj.getPath());
  -            SAXBuilder builder = new SAXBuilder();
  -            Document portletXml = builder.build(portletXmlStream);
  -            Element portletApp = portletXml.getRootElement();
  -            String id = portletApp.getAttributeValue("id");
  -            if (id == null)
  -            {
  -
  -                String warFileName = fileName;
  -                int extensionIdx = warFileName.lastIndexOf(".war");
  -                id = warFileName.substring(0, extensionIdx);
  -                log.info("Application id not defined in portlet.xml so using war name " + id);
               }
   
  -            PortletApplicationWar paWar = new PortletApplicationWar(deploymentObj.getFileObject(), id, "/" + id );
  -            PortletApplicationDefinition pa = registry.getPortletApplicationByIdentifier(id);
  -            boolean registered = (pa != null); 
  -            File deploymentPath = (isLocal ? deploymentObj.getFileObject().getRootDirectory() : new File(pam.getDeploymentPath(id)));
  -            boolean deployed = deploymentPath.exists();
  -            log.info("Portlet application \"" + id + "\"" + ": registered=" + registered + ", deployed=" + deployed);
  -
  -            if (registered && deployed && event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  +    protected void deployPortletApplication(DeploymentEvent event) throws DeploymentException
               {
  -                log.info("Portlet application \"" + id + "\"" + " already registered.  Skipping initial deployment.");
  -                pam.register(paWar);
  -            }
  -            else if (!registered || event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  +      try
               {
  -                if (isLocal)
  -                {
  -                    log.info("Deploying portlet app \"" + id + "\": " + fileName + " will be registered as a local portlet application.");
  -                    pam.register(paWar);
  +          File toFile = new File(webAppDir, event.getName());
  +          new JetspeedDeploy(event.getPath(),toFile.getAbsolutePath());
  +          event.setStatus(DeploymentEvent.STATUS_OKAY);
                   }
  -                else
  +      catch (Exception e)
                   {
  -                    log.info("Deploying portlet app \"" + id + "\": " + "portlet application WAR " + fileName);
  -                    pam.deploy(paWar);
  +          throw new DeploymentException(e);
                   }
               }
  -            else if (deployed || event.getEventType().equals(DeploymentEvent.EVENT_TYPE_REDEPLOY))
  +
  +    protected void deployLocalPortletApplication(DeploymentEvent event) throws DeploymentException
               {
  -                if (isLocal)
  +      try
                   {
  -                    log.error("Redeploying portlet app \"" + id + "\" from " + fileName + " as a local portlet application is not implemented.");
  +        String fileName = event.getName();
  +        String appName = fileName.substring(0,fileName.length()-4);
  +        pam.stopLocalPortletApplication(appName);
  +        File targetDir = new File(localAppDir, appName);
  +        JarExpander.expand(event.getDeploymentObject().getFile(), targetDir);
  +        DirectoryHelper paDirHelper = new DirectoryHelper(targetDir);
  +        pam.startLocalPortletApplication(appName, paDirHelper, createLocalPAClassLoader(targetDir));
  +        event.setStatus(DeploymentEvent.STATUS_OKAY);
                   }
  -                else
  +      catch (Exception e)
                   {
  -                    log.info("Redeploying portlet app \"" + id + "\": " + "portlet application WAR " + fileName);
  -                    pam.redeploy(paWar);
  +        throw new DeploymentException(e);
                   }
               }
  -            appNameToFile.put(deploymentObj.getPath(), id);
   
  -            log.info("Portlet app \"" + id + "\" " + "successfuly (re)deployed.");
  -        }
  -        catch (Exception e)
  +    protected ClassLoader createLocalPAClassLoader(File paDir) throws IOException
  +    {
  +        ArrayList urls = new ArrayList();
  +        File webInfClasses = null;
  +
  +        webInfClasses = new File(paDir, ("WEB-INF/classes/"));
  +        if (webInfClasses.exists())
           {
  -            String msg = "Error (re)deploying portlet app: " + e.toString();
  -            throw new DeploymentException(msg, e);
  +            log.info("Adding " + webInfClasses.toURL() + " to class path for Local PA "+paDir.getName());
  +            urls.add(webInfClasses.toURL());
           }
  -        finally
  +
  +        File webInfLib = new File(paDir, "WEB-INF/lib");
  +
  +        if (webInfLib.exists())
           {
  -            if (portletXmlStream != null)
  -            {
  -                try
  -                {
  -                    portletXmlStream.close();
  -                }
  -                catch (IOException e1)
  +            File[] jars = webInfLib.listFiles();
  +
  +            for (int i = 0; i < jars.length; i++)
                   {
  -                    // ignore
  -                }
  +                File jar = jars[i];
  +                log.info("Adding " + jar.toURL() + " to class path for Local PA "+paDir.getName());
  +                urls.add(jar.toURL());
               }
           }
  +        return new URLClassLoader((URL[]) urls.toArray(new URL[urls.size()]), getClass().getClassLoader());
       }
   
  -    /**
  -     * <p>
  -     * invokeRedeploy
  -     * </p>
  -     * 
  -     * @see org.apache.jetspeed.deployment.DeploymentEventListener#invokeRedeploy(org.apache.jetspeed.deployment.DeploymentEvent)
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    public void invokeRedeploy( DeploymentEvent event ) throws DeploymentException
  -    {
  -        doDeploy(event);
  -    }
   }
  
  
  
  No                   revision
  
  Index: DeployPortletAppEventListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/DeployPortletAppEventListener.java,v
  retrieving revision 1.22
  retrieving revision 1.22.2.1
  diff -u -r1.22 -r1.22.2.1
  --- DeployPortletAppEventListener.java	3 Feb 2005 09:39:13 -0000	1.22
  +++ DeployPortletAppEventListener.java	2 Mar 2005 02:48:58 -0000	1.22.2.1
  @@ -7,11 +7,12 @@
   package org.apache.jetspeed.deployment.impl;
   
   import java.io.File;
  +import java.io.FileFilter;
   import java.io.FileNotFoundException;
   import java.io.IOException;
  -import java.io.InputStream;
  -import java.util.HashMap;
  -import java.util.Map;
  +import java.net.URL;
  +import java.net.URLClassLoader;
  +import java.util.ArrayList;
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -19,14 +20,9 @@
   import org.apache.jetspeed.deployment.DeploymentEvent;
   import org.apache.jetspeed.deployment.DeploymentEventListener;
   import org.apache.jetspeed.deployment.DeploymentException;
  -import org.apache.jetspeed.deployment.DeploymentObject;
  +import org.apache.jetspeed.tools.deploy.JetspeedDeploy;
   import org.apache.jetspeed.tools.pamanager.PortletApplicationManagement;
   import org.apache.jetspeed.util.DirectoryHelper;
  -import org.apache.jetspeed.util.descriptor.PortletApplicationWar;
  -import org.apache.pluto.om.portlet.PortletApplicationDefinition;
  -import org.jdom.Document;
  -import org.jdom.Element;
  -import org.jdom.input.SAXBuilder;
   
   /**
    * <p>
  @@ -43,230 +39,157 @@
   
       protected static final Log log = LogFactory.getLog("deployment");
       private String webAppDir;
  +    private String localAppDir;
       private PortletApplicationManagement pam;
  -    private Map appNameToFile;
  -    protected PortletRegistry registry;
  +    private PortletRegistry registry;
   
       /**
  -     * 
  -     * @param webAppDir
        * @param pam
  -     * @param registry
  +     * @param webAppDir
  +     * @param localAppDir
        * @throws FileNotFoundException
  -     *             the <code>webAppDir</code> directory does not exist.
  +     *             the <code>webAppDir</code> or <code>localAppDir</code> directory does not exist.
        */
  -    public DeployPortletAppEventListener( String webAppDir, PortletApplicationManagement pam,
  -                                          PortletRegistry registry) throws FileNotFoundException
  +    public DeployPortletAppEventListener(PortletApplicationManagement pam, PortletRegistry registry, String webAppDir, String localAppDir) throws FileNotFoundException
       {
  -        File checkFile = new File(webAppDir);
  +        this.pam = pam;
  +        this.registry = registry;
   
  -        if (checkFile.exists())
  +        File webAppDirFile = new File(webAppDir);
  +
  +        if (webAppDirFile.exists())
           {
               this.webAppDir = webAppDir;
           }
           else
           {
               throw new FileNotFoundException("The depoyment directory for portlet applications \""
  -                    + checkFile.getAbsolutePath() + "\" does not exist.");
  +                                            + webAppDirFile.getAbsolutePath() + "\" does not exist.");
           }
  -        this.pam = pam;
  -        this.appNameToFile = new HashMap();
  -        this.registry = registry;
  -    }
  +        File localAppDirFile = new File(localAppDir);
   
  -    /**
  -     * <p>
  -     * doUnDeploy
  -     * </p>
  -     * 
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    public void invokeUndeploy( DeploymentEvent event ) throws DeploymentException
  -    {
  -        String paName = null;
  -        try
  +        if (!localAppDirFile.exists())
           {
  -            String filePath = event.getPath();
  -            paName = (String) appNameToFile.get(filePath);
  -            if (paName == null)
  -            {
  -                return;
  -            }
  -
  -            boolean isLocal = event.getName().startsWith("jetspeed-");
  -
  -            PortletApplicationWar deployedWar = null;
  -
  -            PortletApplicationDefinition pa = registry.getPortletApplicationByIdentifier(paName);
  -            String webAppContextRoot = null;
  -
  -            if (pa != null)
  -            {
  -                webAppContextRoot = pa.getWebApplicationDefinition().getContextRoot();
  -            }
  -            else
  -            {
  -                webAppContextRoot = "/" + paName;
  -            }
  -
  -            if (isLocal)
  +            localAppDirFile.mkdirs();
  +        }
  +        else if (!localAppDirFile.isDirectory())
  +        {
  +            throw new FileNotFoundException("Invalid depoyment directory for local portlet applications: \""
  +                                            + localAppDirFile.getAbsolutePath());
  +        }
  +        this.localAppDir = localAppDir;
  +    }
  +    
  +    public void initialize()
               {
  -                log.info("Preparing to unregister portlet application \"" + paName + "\"");
  -                pam.unregister(paName);
  -            }
  -            else
  +        // start deployed local pa
  +        File[] localApps = new File(localAppDir).listFiles(
  +           new FileFilter() 
  +           {
  +               public boolean accept(File pathname)
               {
  -                log.info("Preparing to undeploy portlet application \"" + paName + "\"");
  -                DirectoryHelper dir = new DirectoryHelper(new File(webAppDir + "/" + paName));
  -                deployedWar = new PortletApplicationWar(dir, paName, webAppContextRoot );
  -                pam.undeploy(deployedWar);
  +                   return pathname.isDirectory() && registry.getPortletApplication(pathname.getName()) != null;
               }
  -
  -            log.info("Portlet application \"" + paName + "\"" + " was successfuly undeployed.");
  -        }
  -        catch (Exception e)
  +           });
  +        for ( int i = 0; i < localApps.length; i++ )
           {
  -            String msg = "Error undeploying portlet app " + paName + ": " + e.toString();
  -            if (e instanceof DeploymentException)
  +            DirectoryHelper paDirHelper = new DirectoryHelper(localApps[i]);
  +            try
               {
  -                throw (DeploymentException) e;
  +                pam.startLocalPortletApplication(localApps[i].getName(), paDirHelper, createLocalPAClassLoader(localApps[i]));
               }
  -            else
  +            catch (Exception e)
               {
  -                throw new DeploymentException(msg, e);
  +                log.error("Failed to start Local Portlet Application "+localApps[i],e);
               }
  -
           }
       }
   
       /**
        * <p>
  -     * doDeploy
  +     * invokeDeploy
        * </p>
        * 
        * @param event
        * @throws DeploymentException
  -     * @throws PortletApplicationException
  -     * @throws IOException
  -     * @throws JDOMException
        */
       public void invokeDeploy( DeploymentEvent event ) throws DeploymentException
       {
  -        doDeploy(event);
  -
  -    }
  -
  -    /**
  -     * <p>
  -     * doDeploy
  -     * </p>
  -     * 
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    protected void doDeploy( DeploymentEvent event ) throws DeploymentException
  +      String fileName = event.getName();
  +      if (fileName.endsWith(".war"))
       {
  -        InputStream portletXmlStream = null;
  -        try
  +        int prefixLength = PortletApplicationManagement.LOCAL_PA_PREFIX.length();
  +        if (fileName.length() > prefixLength && 
  +            fileName.substring(0,prefixLength).equalsIgnoreCase(PortletApplicationManagement.LOCAL_PA_PREFIX))
           {
  -            DeploymentObject deploymentObj = event.getDeploymentObject();
  -            portletXmlStream = deploymentObj.getConfiguration("WEB-INF/portlet.xml");
  -            if (portletXmlStream == null)
  +          deployLocalPortletApplication(event);
  +        }
  +        else
               {
  -                return;
  +          deployPortletApplication(event);
  +        }
               }
  -
  -            String fileName = deploymentObj.getName();
  -            boolean isLocal = fileName.startsWith("jetspeed-");
  -
  -            log.info("Loading portlet application from web archive " + deploymentObj.getPath());
  -            SAXBuilder builder = new SAXBuilder();
  -            Document portletXml = builder.build(portletXmlStream);
  -            Element portletApp = portletXml.getRootElement();
  -            String id = portletApp.getAttributeValue("id");
  -            if (id == null)
  -            {
  -
  -                String warFileName = fileName;
  -                int extensionIdx = warFileName.lastIndexOf(".war");
  -                id = warFileName.substring(0, extensionIdx);
  -                log.info("Application id not defined in portlet.xml so using war name " + id);
               }
   
  -            PortletApplicationWar paWar = new PortletApplicationWar(deploymentObj.getFileObject(), id, "/" + id );
  -            PortletApplicationDefinition pa = registry.getPortletApplicationByIdentifier(id);
  -            boolean registered = (pa != null); 
  -            File deploymentPath = (isLocal ? deploymentObj.getFileObject().getRootDirectory() : new File(pam.getDeploymentPath(id)));
  -            boolean deployed = deploymentPath.exists();
  -            log.info("Portlet application \"" + id + "\"" + ": registered=" + registered + ", deployed=" + deployed);
  -
  -            if (registered && deployed && event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  +    protected void deployPortletApplication(DeploymentEvent event) throws DeploymentException
               {
  -                log.info("Portlet application \"" + id + "\"" + " already registered.  Skipping initial deployment.");
  -                pam.register(paWar);
  -            }
  -            else if (!registered || event.getEventType().equals(DeploymentEvent.EVENT_TYPE_DEPLOY))
  +      try
               {
  -                if (isLocal)
  -                {
  -                    log.info("Deploying portlet app \"" + id + "\": " + fileName + " will be registered as a local portlet application.");
  -                    pam.register(paWar);
  +          File toFile = new File(webAppDir, event.getName());
  +          new JetspeedDeploy(event.getPath(),toFile.getAbsolutePath());
  +          event.setStatus(DeploymentEvent.STATUS_OKAY);
                   }
  -                else
  +      catch (Exception e)
                   {
  -                    log.info("Deploying portlet app \"" + id + "\": " + "portlet application WAR " + fileName);
  -                    pam.deploy(paWar);
  +          throw new DeploymentException(e);
                   }
               }
  -            else if (deployed || event.getEventType().equals(DeploymentEvent.EVENT_TYPE_REDEPLOY))
  +
  +    protected void deployLocalPortletApplication(DeploymentEvent event) throws DeploymentException
               {
  -                if (isLocal)
  +      try
                   {
  -                    log.error("Redeploying portlet app \"" + id + "\" from " + fileName + " as a local portlet application is not implemented.");
  +        String fileName = event.getName();
  +        String appName = fileName.substring(0,fileName.length()-4);
  +        pam.stopLocalPortletApplication(appName);
  +        File targetDir = new File(localAppDir, appName);
  +        JarExpander.expand(event.getDeploymentObject().getFile(), targetDir);
  +        DirectoryHelper paDirHelper = new DirectoryHelper(targetDir);
  +        pam.startLocalPortletApplication(appName, paDirHelper, createLocalPAClassLoader(targetDir));
  +        event.setStatus(DeploymentEvent.STATUS_OKAY);
                   }
  -                else
  +      catch (Exception e)
                   {
  -                    log.info("Redeploying portlet app \"" + id + "\": " + "portlet application WAR " + fileName);
  -                    pam.redeploy(paWar);
  +        throw new DeploymentException(e);
                   }
               }
  -            appNameToFile.put(deploymentObj.getPath(), id);
   
  -            log.info("Portlet app \"" + id + "\" " + "successfuly (re)deployed.");
  -        }
  -        catch (Exception e)
  +    protected ClassLoader createLocalPAClassLoader(File paDir) throws IOException
  +    {
  +        ArrayList urls = new ArrayList();
  +        File webInfClasses = null;
  +
  +        webInfClasses = new File(paDir, ("WEB-INF/classes/"));
  +        if (webInfClasses.exists())
           {
  -            String msg = "Error (re)deploying portlet app: " + e.toString();
  -            throw new DeploymentException(msg, e);
  +            log.info("Adding " + webInfClasses.toURL() + " to class path for Local PA "+paDir.getName());
  +            urls.add(webInfClasses.toURL());
           }
  -        finally
  +
  +        File webInfLib = new File(paDir, "WEB-INF/lib");
  +
  +        if (webInfLib.exists())
           {
  -            if (portletXmlStream != null)
  -            {
  -                try
  -                {
  -                    portletXmlStream.close();
  -                }
  -                catch (IOException e1)
  +            File[] jars = webInfLib.listFiles();
  +
  +            for (int i = 0; i < jars.length; i++)
                   {
  -                    // ignore
  -                }
  +                File jar = jars[i];
  +                log.info("Adding " + jar.toURL() + " to class path for Local PA "+paDir.getName());
  +                urls.add(jar.toURL());
               }
           }
  +        return new URLClassLoader((URL[]) urls.toArray(new URL[urls.size()]), getClass().getClassLoader());
       }
   
  -    /**
  -     * <p>
  -     * invokeRedeploy
  -     * </p>
  -     * 
  -     * @see org.apache.jetspeed.deployment.DeploymentEventListener#invokeRedeploy(org.apache.jetspeed.deployment.DeploymentEvent)
  -     * @param event
  -     * @throws DeploymentException
  -     */
  -    public void invokeRedeploy( DeploymentEvent event ) throws DeploymentException
  -    {
  -        doDeploy(event);
  -    }
   }
  
  
  
  1.1.2.1   +113 -0    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/deployment/impl/Attic/JarExpander.java
  
  
  
  
  No                   revision
  No                   revision
  1.20.2.1  +12 -2     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java
  
  Index: PortletApplicationWar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/util/descriptor/PortletApplicationWar.java,v
  retrieving revision 1.20
  retrieving revision 1.20.2.1
  diff -u -r1.20 -r1.20.2.1
  --- PortletApplicationWar.java	28 Jan 2005 01:39:07 -0000	1.20
  +++ PortletApplicationWar.java	2 Mar 2005 02:48:58 -0000	1.20.2.1
  @@ -96,6 +96,7 @@
       protected FileSystemHelper warStruct;
       private MutableWebApplication webApp;
       private MutablePortletApplication portletApp;
  +    private long paChecksum;
       protected final List openedResources;
   
       protected static final String[] ELEMENTS_BEFORE_SERVLET = new String[]{"icon", "display-name", "description",
  @@ -124,7 +125,16 @@
           this.webAppContextRoot = webAppContextRoot;
           this.openedResources = new ArrayList();
           this.warStruct = warStruct;
  +        this.paChecksum = warStruct.getChecksum(PORTLET_XML_PATH);
  +        if (paChecksum == 0)
  +        {
  +          throw new IOException("Cannot find required "+PORTLET_XML_PATH+" for Portlet Application "+paName);
  +        }
  +    }
   
  +    public long getPortletApplicationChecksum()
  +    {
  +      return paChecksum;
       }
   
       /**
  @@ -239,7 +249,7 @@
                       extMetaDataXml.close();
                   }
               }
  -
  +            portletApp.setChecksum(paChecksum);
               return portletApp;
           }
           finally
  @@ -690,4 +700,4 @@
       {
           return warStruct;
       }
  -}
  \ No newline at end of file
  +}
  
  
  

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