User: oberg   
  Date: 00/10/24 12:52:13

  Modified:    src/main/org/jboss/ejb AutoDeployer.java
  Log:
  Only .jar and .zip files are considered for deploy.
  
  Revision  Changes    Path
  1.7       +16 -3     jboss/src/main/org/jboss/ejb/AutoDeployer.java
  
  Index: AutoDeployer.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/AutoDeployer.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AutoDeployer.java 2000/09/03 03:04:56     1.6
  +++ AutoDeployer.java 2000/10/24 19:52:12     1.7
  @@ -38,7 +38,7 @@
    *
    *   @see ContainerFactory
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.6 $
  + *   @version $Revision: 1.7 $
    */
   public class AutoDeployer
        extends ServiceMBeanSupport
  @@ -113,8 +113,12 @@
                     log.warning(e.toString());
                  }
               }
  -         } else if (urlFile.exists()) // It's a file (.jar)
  +         } else if (urlFile.exists()) // It's a file
            {
  +               // Check if it's a JAR or zip
  +               if (!(url.endsWith(".jar") || url.endsWith(".zip")))
  +                  continue; // Was not a JAR or zip - skip it...
  +               
                  try
                  {
                     watchedURLs.add(new 
Deployment(urlFile.getCanonicalFile().toURL()));
  @@ -123,8 +127,12 @@
                  {
                     log.warning("Cannot auto-deploy "+urlFile);
                  }
  -         } else // It's a real URL (probably http:) pointing to a JAR
  +         } else // It's a real URL (probably http:)
            {
  +            // Check if it's a JAR or zip
  +            if (!(url.endsWith(".jar") || url.endsWith(".zip")))
  +               continue; // Was not a JAR or zip - skip it...
  +               
               try
               {
                  watchedURLs.add(new Deployment(new URL(url)));
  @@ -158,6 +166,11 @@
                  for (int idx = 0; idx < files.length; idx++)
                  {
                     URL fileUrl = files[idx].toURL();
  +                  
  +                  // Check if it's a JAR or zip
  +                  if (!(fileUrl.getFile().endsWith(".jar") || 
fileUrl.getFile().endsWith(".zip")))
  +                     continue; // Was not a JAR or zip - skip it...
  +                     
                     if (deployedURLs.get(fileUrl) == null)
                     {
                                                        // This file has not been seen 
before
  
  
  

Reply via email to