geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject cvs commit: incubator-geronimo/modules/kernel/src/test/org/apache/geronimo/tools/xdoclet GeronimoDocletTaskTest.java
Date Thu, 22 Jan 2004 08:10:27 GMT
dblevins    2004/01/22 00:10:27

  Modified:    modules/core/src/java/org/apache/geronimo/connector/deployment
                        ConnectorDeployer.java ConnectorModule.java
               modules/core/src/java/org/apache/geronimo/naming/java
                        ComponentContextBuilder.java
               modules/core/src/test/org/apache/geronimo/test/util
                        ServerUtil.java
               modules/deployment/src/java/org/apache/geronimo/deployment
                        BatchDeployer.java Bootstrap.java
                        DeploymentModule.java ModuleFactory.java
               modules/deployment/src/java/org/apache/geronimo/deployment/service
                        ServiceDeployer.java ServiceModule.java
               modules/deployment/src/java/org/apache/geronimo/deployment/tools
                        DeployCommand.java
               modules/deployment/src/java/org/apache/geronimo/deployment/util
                        DeploymentHelper.java ExplicitDeployment.java
               modules/deployment/src/test/org/apache/geronimo/deployment/service
                        ParentDeployerTest.java ServiceDeployerTest.java
               modules/jetty/src/java/org/apache/geronimo/jetty/deployment
                        JettyModule.java
               modules/kernel/src/java/org/apache/geronimo/kernel/jmx
                        JMXUtil.java
               modules/kernel/src/java/org/apache/geronimo/kernel/service
                        GeronimoMBean.java ParserUtil.java
  Added:       modules/deployment/src/java/org/apache/geronimo/deployment
                        DeploymentException.java
               modules/deployment/src/java/org/apache/geronimo/deployment/util
                        URLInfo.java URLType.java
  Removed:     modules/core/src/java/org/apache/geronimo/command
                        DeployCommand.java StartCommand.java
               modules/core/src/test/org/apache/geronimo/naming/java
                        ContextBuilderTest.java
               modules/core/src/test/org/apache/geronimo/naming/jmx
                        ContextTest.java
               modules/kernel/src/java/org/apache/geronimo/kernel Main.java
               modules/kernel/src/java/org/apache/geronimo/kernel/deployment
                        AbstractDeploymentPlanner.java
                        ApplicationDeployer.java DependencyService.java
                        Deployer.java DeploymentController.java
                        DeploymentException.java DeploymentHelper.java
                        DeploymentInfo.java DeploymentPlan.java
                        DeploymentPlanner.java GeronimoTargetModule.java
                        ServerTarget.java
               modules/kernel/src/java/org/apache/geronimo/kernel/deployment/goal
                        DeployURL.java DeploymentGoal.java
                        DistributeURL.java NormalizedURLDeploymentGoal.java
                        RedeployURL.java URLDeploymentGoal.java
                        UndeployURL.java
               modules/kernel/src/java/org/apache/geronimo/kernel/deployment/scanner
                        DeploymentScanner.java FileSystemScanner.java
                        Scanner.java URLInfo.java URLType.java
                        WebDAVScanner.java
               modules/kernel/src/java/org/apache/geronimo/kernel/deployment/service
                        ClassSpaceMetadata.java
                        ClassSpaceMetadataXMLLoader.java
                        MBeanDependencyMetadata.java MBeanMetadata.java
                        MBeanMetadataXMLLoader.java
                        MBeanRelationshipMetadata.java
                        ServiceDeploymentPlanner.java
               modules/kernel/src/java/org/apache/geronimo/kernel/deployment/task
                        CreateClassSpace.java CreateMBeanInstance.java
                        DeployGeronimoMBean.java DeploymentTask.java
                        DestroyMBeanInstance.java
                        InitializeMBeanInstance.java
                        InvokeMBeanOperation.java
                        RegisterMBeanInstance.java StartMBeanInstance.java
                        StopMBeanInstance.java UnregisterMBeanInstance.java
               modules/kernel/src/java/org/apache/geronimo/kernel/service
                        GeronimoMBeanInfoXMLLoader.java
               modules/kernel/src/test/org/apache/geronimo/kernel/deployment
                        DeploymentPlanTest.java
               modules/kernel/src/test/org/apache/geronimo/kernel/deployment/client
                        DeploymentNotificationTest.java
               modules/kernel/src/test/org/apache/geronimo/kernel/deployment/goal
                        AbstractDeploymentGoalTest.java DeployURLTest.java
                        DistributeURLTest.java RedeployURLTest.java
                        UndeployURLTest.java
               modules/kernel/src/test/org/apache/geronimo/tools/xdoclet
                        GeronimoDocletTaskTest.java
  Log:
  Removed the deployment planner, plan, goal, task code.
  
  Moved some of the remaining kernel.deployment classes into the new
  deployment module, including DeploymentException.
  
  Removed the kernel.Main class as it does not work with the new system.
  Removed StartCommand and DeployCommand as they referenced the Main class.
  
  Revision  Changes    Path
  1.2       +3 -3      incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorDeployer.java
  
  Index: ConnectorDeployer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorDeployer.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectorDeployer.java	21 Jan 2004 22:21:25 -0000	1.1
  +++ ConnectorDeployer.java	22 Jan 2004 08:10:26 -0000	1.2
  @@ -68,8 +68,8 @@
   import org.apache.geronimo.deployment.model.connector.ConnectorDocument;
   import org.apache.geronimo.deployment.xml.ParserFactory;
   import org.apache.geronimo.deployment.util.DeploymentHelper;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.util.URLInfo;
  +import org.apache.geronimo.deployment.DeploymentException;
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.GBeanInfoFactory;
   import org.apache.geronimo.gbean.GAttributeInfo;
  
  
  
  1.2       +2 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorModule.java
  
  Index: ConnectorModule.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/connector/deployment/ConnectorModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConnectorModule.java	21 Jan 2004 22:21:25 -0000	1.1
  +++ ConnectorModule.java	22 Jan 2004 08:10:26 -0000	1.2
  @@ -83,7 +83,7 @@
   import org.apache.geronimo.gbean.InvalidConfigurationException;
   import org.apache.geronimo.gbean.jmx.GBeanMBean;
   import org.apache.geronimo.kernel.Kernel;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.DeploymentException;
   
   /**
    *
  
  
  
  1.12      +2 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java
  
  Index: ComponentContextBuilder.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/naming/java/ComponentContextBuilder.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ComponentContextBuilder.java	12 Jan 2004 06:19:52 -0000	1.11
  +++ ComponentContextBuilder.java	22 Jan 2004 08:10:26 -0000	1.12
  @@ -67,7 +67,7 @@
   import org.apache.geronimo.deployment.model.geronimo.j2ee.JNDIEnvironmentRefs;
   import org.apache.geronimo.deployment.model.geronimo.j2ee.ResourceRef;
   import org.apache.geronimo.deployment.model.j2ee.EnvEntry;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.DeploymentException;
   
   /**
    *
  
  
  
  1.3       +5 -4      incubator-geronimo/modules/core/src/test/org/apache/geronimo/test/util/ServerUtil.java
  
  Index: ServerUtil.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/test/org/apache/geronimo/test/util/ServerUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServerUtil.java	19 Nov 2003 02:07:01 -0000	1.2
  +++ ServerUtil.java	22 Jan 2004 08:10:26 -0000	1.3
  @@ -56,7 +56,7 @@
   package org.apache.geronimo.test.util;
   
   import org.apache.geronimo.kernel.jmx.JMXUtil;
  -import org.apache.geronimo.kernel.deployment.service.MBeanRelationshipMetadata;
  +//import org.apache.geronimo.kernel.deployment.service.MBeanRelationshipMetadata;
   
   import javax.management.ObjectName;
   import javax.management.MBeanServer;
  @@ -102,9 +102,10 @@
           mbServer.setAttribute(LOADER, new Attribute("RouterTarget", SUBSYSTEM.toString()));
   
           mbServer.createMBean("org.apache.geronimo.remoting.router.JMXRouter", JMX_ROUTER);
  -        MBeanRelationshipMetadata relMetadata = new MBeanRelationshipMetadata("/JMX", "Route",
"Target", SUBSYSTEM, "Source");
           HashSet relations = new HashSet();
  -        relations.add(relMetadata);
  +        // DMB: Hacked!
  +        //MBeanRelationshipMetadata relMetadata = new MBeanRelationshipMetadata("/JMX",
"Route", "Target", SUBSYSTEM, "Source");
  +        //relations.add(relMetadata);
           mbServer.invoke(DEPENDS_SERVICE, "addRelationships", new Object[]{JMX_ROUTER, relations},
new String[]{ObjectName.class.getName(), Set.class.getName()});
   
           mbServer.invoke(SUBSYSTEM, "start", null, null);
  
  
  
  1.4       +3 -3      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/BatchDeployer.java
  
  Index: BatchDeployer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/BatchDeployer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BatchDeployer.java	17 Jan 2004 03:44:38 -0000	1.3
  +++ BatchDeployer.java	22 Jan 2004 08:10:26 -0000	1.4
  @@ -82,8 +82,8 @@
   
   import org.apache.geronimo.kernel.config.Configuration;
   import org.apache.geronimo.kernel.config.ConfigurationParent;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  +import org.apache.geronimo.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.util.URLInfo;
   import org.apache.geronimo.gbean.GAttributeInfo;
   import org.apache.geronimo.gbean.InvalidConfigurationException;
   import org.apache.geronimo.gbean.jmx.GBeanMBean;
  
  
  
  1.3       +3 -3      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/Bootstrap.java
  
  Index: Bootstrap.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/Bootstrap.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Bootstrap.java	17 Jan 2004 03:44:38 -0000	1.2
  +++ Bootstrap.java	22 Jan 2004 08:10:26 -0000	1.3
  @@ -69,8 +69,8 @@
   import org.apache.geronimo.deployment.util.FileUtil;
   import org.apache.geronimo.kernel.Kernel;
   import org.apache.geronimo.kernel.config.LocalConfigStore;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.scanner.URLType;
  +import org.apache.geronimo.deployment.util.URLInfo;
  +import org.apache.geronimo.deployment.util.URLType;
   
   /**
    * Helper class to bootstrap a Geronimo instance from a service archive.
  
  
  
  1.2       +2 -2      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentModule.java
  
  Index: DeploymentModule.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeploymentModule.java	16 Jan 2004 03:48:42 -0000	1.1
  +++ DeploymentModule.java	22 Jan 2004 08:10:26 -0000	1.2
  @@ -58,7 +58,7 @@
   import java.util.List;
   import java.util.Map;
   
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.DeploymentException;
   
   /**
    * A module representing a resource being deployed. The deployer will call each
  
  
  
  1.2       +3 -3      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/ModuleFactory.java
  
  Index: ModuleFactory.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/ModuleFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ModuleFactory.java	16 Jan 2004 03:48:42 -0000	1.1
  +++ ModuleFactory.java	22 Jan 2004 08:10:26 -0000	1.2
  @@ -57,8 +57,8 @@
   
   import java.net.URI;
   
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  +import org.apache.geronimo.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.util.URLInfo;
   
   /**
    * A factory for a specific module type capable of returning a module from
  
  
  
  1.1                  incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentException.java
  
  Index: DeploymentException.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package org.apache.geronimo.deployment;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/22 08:10:26 $
   */
  public class DeploymentException extends Exception {
  
  
      public DeploymentException() {
      }
  
      public DeploymentException(Throwable cause) {
          super(cause);
      }
  
      public DeploymentException(String message) {
          super(message);
      }
  
      public DeploymentException(String message, Throwable cause) {
          super(message, cause);
      }
  
  }
  
  
  
  1.8       +4 -4      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/service/ServiceDeployer.java
  
  Index: ServiceDeployer.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/service/ServiceDeployer.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ServiceDeployer.java	20 Jan 2004 06:10:29 -0000	1.7
  +++ ServiceDeployer.java	22 Jan 2004 08:10:26 -0000	1.8
  @@ -74,9 +74,9 @@
   import org.apache.geronimo.deployment.DeploymentModule;
   import org.apache.geronimo.deployment.ModuleFactory;
   import org.apache.geronimo.deployment.util.DeploymentHelper;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.service.XMLUtil;
  +import org.apache.geronimo.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.util.URLInfo;
  +import org.apache.geronimo.deployment.util.XMLUtil;
   import org.w3c.dom.Document;
   import org.w3c.dom.Element;
   import org.w3c.dom.Node;
  
  
  
  1.4       +4 -4      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/service/ServiceModule.java
  
  Index: ServiceModule.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/service/ServiceModule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServiceModule.java	19 Jan 2004 06:40:07 -0000	1.3
  +++ ServiceModule.java	22 Jan 2004 08:10:26 -0000	1.4
  @@ -78,9 +78,9 @@
   import org.apache.geronimo.gbean.GBeanInfo;
   import org.apache.geronimo.gbean.InvalidConfigurationException;
   import org.apache.geronimo.gbean.jmx.GBeanMBean;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.scanner.URLType;
  +import org.apache.geronimo.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.util.URLInfo;
  +import org.apache.geronimo.deployment.util.URLType;
   
   /**
    *
  
  
  
  1.4       +4 -4      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/tools/DeployCommand.java
  
  Index: DeployCommand.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/tools/DeployCommand.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DeployCommand.java	19 Jan 2004 06:40:07 -0000	1.3
  +++ DeployCommand.java	22 Jan 2004 08:10:26 -0000	1.4
  @@ -74,9 +74,9 @@
   import org.apache.geronimo.deployment.NoDeployerException;
   import org.apache.geronimo.deployment.util.FileUtil;
   import org.apache.geronimo.deployment.service.ServiceDeployer;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.scanner.URLType;
  +import org.apache.geronimo.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.util.URLInfo;
  +import org.apache.geronimo.deployment.util.URLType;
   
   /**
    *
  
  
  
  1.3       +4 -12     incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/util/DeploymentHelper.java
  
  Index: DeploymentHelper.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/util/DeploymentHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeploymentHelper.java	17 Jan 2004 01:32:38 -0000	1.2
  +++ DeploymentHelper.java	22 Jan 2004 08:10:26 -0000	1.3
  @@ -56,21 +56,13 @@
   
   package org.apache.geronimo.deployment.util;
   
  -import java.net.URL;
  -import java.net.MalformedURLException;
  -import java.util.List;
   import java.io.IOException;
  -import java.io.InputStream;
  +import java.net.MalformedURLException;
  +import java.net.URL;
   
  -import javax.management.ObjectName;
   import javax.xml.parsers.DocumentBuilder;
   
  -import org.apache.geronimo.kernel.deployment.service.ClassSpaceMetadata;
  -import org.apache.geronimo.kernel.deployment.scanner.URLType;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  -import org.apache.geronimo.kernel.service.GeronimoMBeanInfoXMLLoader;
  -import org.apache.geronimo.kernel.jmx.JMXUtil;
  +import org.apache.geronimo.deployment.DeploymentException;
   import org.w3c.dom.Document;
   import org.xml.sax.SAXException;
   
  
  
  
  1.3       +3 -3      incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/util/ExplicitDeployment.java
  
  Index: ExplicitDeployment.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/util/ExplicitDeployment.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExplicitDeployment.java	22 Jan 2004 02:46:27 -0000	1.2
  +++ ExplicitDeployment.java	22 Jan 2004 08:10:26 -0000	1.3
  @@ -75,8 +75,8 @@
   import org.apache.geronimo.kernel.KernelMBean;
   import org.apache.geronimo.kernel.config.ConfigurationParent;
   import org.apache.geronimo.kernel.config.NoSuchConfigException;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.scanner.URLType;
  +import org.apache.geronimo.deployment.util.URLInfo;
  +import org.apache.geronimo.deployment.util.URLType;
   
   /**
    *
  
  
  
  1.1                  incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/util/URLInfo.java
  
  Index: URLInfo.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package org.apache.geronimo.deployment.util;
  
  import java.net.URL;
  import java.io.IOException;
  
  /**
   *
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/22 08:10:26 $
   */
  public class URLInfo {
      private final URL url;
      private final URLType type;
  
      public URLInfo(URL url, URLType type) {
          assert url != null : "url was null";
          assert type != null : "type was null";
          this.url = url;
          this.type = type;
      }
  
      public URLInfo(URL url) throws IOException {
          this(url, URLType.getType(url));
      }
  
      public URLType getType() {
          return type;
      }
  
      public URL getUrl() {
          return url;
      }
  
      public String toString() {
          return url + " (" + type.toString() + ")";
      }
  
      public boolean equals(Object obj) {
          if (obj instanceof URLInfo) {
              return this.url.equals(((URLInfo) obj).url);
          }
          return false;
      }
  
      public int hashCode() {
          return url.hashCode();
      }
  
  }
  
  
  
  1.1                  incubator-geronimo/modules/deployment/src/java/org/apache/geronimo/deployment/util/URLType.java
  
  Index: URLType.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Geronimo" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Geronimo", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * ====================================================================
   */
  package org.apache.geronimo.deployment.util;
  
  import java.io.File;
  import java.io.IOException;
  import java.io.InputStream;
  import java.net.JarURLConnection;
  import java.net.URL;
  import java.net.URLConnection;
  import java.util.jar.JarFile;
  import java.util.zip.ZipException;
  
  /**
   * The URLType class assigns type to resources, i.e. files or URLs.
   * <p>
   * The following types are available:
   * <ul>
   *  <li><b>UNPACKED_ARCHIVE</b> - directory with META-INF/MANIFEST.MF

   *  <li><b>PACKED_ARCHIVE</b> - file with META-INF/MANIFEST.MF
   *  <li><b>COLLECTION</b> - directory with no META-INF/MANIFEST.MF
   *  <li><b>RESOURCE</b> -  none of the above
   * </ul>
   *
   * @version $Revision: 1.1 $ $Date: 2004/01/22 08:10:26 $
   */
  public class URLType {
      public static final String MANIFEST_LOCATION = "META-INF/MANIFEST.MF";
  
      public static final URLType RESOURCE = new URLType("RESOURCE");
      public static final URLType COLLECTION = new URLType("COLLECTION");
      public static final URLType PACKED_ARCHIVE = new URLType("PACKED_ARCHIVE");
      public static final URLType UNPACKED_ARCHIVE = new URLType("UNPACKED_ARCHIVE");
  
      public static URLType getType(File file) throws IOException {
          if (file.isDirectory()) {
              // file is a directory - see if it has a manifest
              // we check for an actual manifest file to keep things consistent with a packed
archive
              if (new File(file, MANIFEST_LOCATION).exists()) {
                  return UNPACKED_ARCHIVE;
              } else {
                  return COLLECTION;
              }
          } else {
              // we have a regular file - see if it contains a manifest
              try {
                  JarFile jar = new JarFile(file);
                  jar.getManifest();
                  jar.close();
                  return PACKED_ARCHIVE;
              } catch (ZipException e) {
                  return RESOURCE;
              }
          }
      }
  
      /**
       * Returns the type of url
       * 
       * @param url 
       * @return type of the url
       * @throws IOException whenever there're problems with accessing portion of the url
       */
      public static URLType getType(URL url) throws IOException {
          if (url.toString().endsWith("/")) {
              URL metaInfURL = new URL(url, MANIFEST_LOCATION);
              URLConnection urlConnection = metaInfURL.openConnection();
              urlConnection.connect();
              try {
                  InputStream is = urlConnection.getInputStream();
                  is.close();
                  return UNPACKED_ARCHIVE;
              } catch (IOException e) {
                  return COLLECTION;
              }
          } else {
              URL jarURL = new URL("jar:" + url.toString() + "!/");
              JarURLConnection jarConnection = (JarURLConnection) jarURL.openConnection();
              try {
                  jarConnection.getManifest();
                  return PACKED_ARCHIVE;
              } catch (ZipException e) {
                  return RESOURCE;
              }
          }
      }
  
      private final String desc;
  
      private URLType(final String desc) {
          this.desc = desc;
      }
  
      public boolean equals(Object obj) {
          return this == obj;
      }
  
      public String toString() {
          return desc;
      }
  }
  
  
  
  1.2       +2 -2      incubator-geronimo/modules/deployment/src/test/org/apache/geronimo/deployment/service/ParentDeployerTest.java
  
  Index: ParentDeployerTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/test/org/apache/geronimo/deployment/service/ParentDeployerTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParentDeployerTest.java	17 Jan 2004 03:44:38 -0000	1.1
  +++ ParentDeployerTest.java	22 Jan 2004 08:10:26 -0000	1.2
  @@ -72,7 +72,7 @@
   import org.apache.geronimo.kernel.Kernel;
   import org.apache.geronimo.kernel.config.Configuration;
   import org.apache.geronimo.kernel.config.ConfigurationParent;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  +import org.apache.geronimo.deployment.util.URLInfo;
   import org.apache.geronimo.kernel.jmx.MBeanProxyFactory;
   import junit.framework.TestCase;
   
  
  
  
  1.5       +3 -3      incubator-geronimo/modules/deployment/src/test/org/apache/geronimo/deployment/service/ServiceDeployerTest.java
  
  Index: ServiceDeployerTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/deployment/src/test/org/apache/geronimo/deployment/service/ServiceDeployerTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServiceDeployerTest.java	17 Jan 2004 03:44:38 -0000	1.4
  +++ ServiceDeployerTest.java	22 Jan 2004 08:10:26 -0000	1.5
  @@ -76,8 +76,8 @@
   import org.apache.geronimo.deployment.ConfigurationCallback;
   import org.apache.geronimo.deployment.BatchDeployer;
   import org.apache.geronimo.deployment.util.FileUtil;
  -import org.apache.geronimo.kernel.deployment.scanner.URLInfo;
  -import org.apache.geronimo.kernel.deployment.scanner.URLType;
  +import org.apache.geronimo.deployment.util.URLInfo;
  +import org.apache.geronimo.deployment.util.URLType;
   import org.apache.geronimo.gbean.jmx.GBeanMBean;
   import junit.framework.TestCase;
   
  
  
  
  1.2       +2 -2      incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModule.java
  
  Index: JettyModule.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/jetty/src/java/org/apache/geronimo/jetty/deployment/JettyModule.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JettyModule.java	22 Jan 2004 00:51:09 -0000	1.1
  +++ JettyModule.java	22 Jan 2004 08:10:26 -0000	1.2
  @@ -65,7 +65,7 @@
   import org.apache.geronimo.deployment.DeploymentModule;
   import org.apache.geronimo.gbean.jmx.GBeanMBean;
   import org.apache.geronimo.jetty.JettyWebApplicationContext;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
  +import org.apache.geronimo.deployment.DeploymentException;
   
   /**
    * 
  
  
  
  1.2       +1 -6      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/JMXUtil.java
  
  Index: JMXUtil.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/jmx/JMXUtil.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JMXUtil.java	8 Sep 2003 04:38:34 -0000	1.1
  +++ JMXUtil.java	22 Jan 2004 08:10:27 -0000	1.2
  @@ -60,7 +60,6 @@
   import javax.management.ObjectName;
   import javax.management.relation.RelationServiceMBean;
   
  -import org.apache.geronimo.kernel.deployment.DependencyServiceMBean;
   
   /**
    * Helper class for JMX Operations
  @@ -93,9 +92,5 @@
   
       public static RelationServiceMBean getRelationService(MBeanServer server) {
           return (RelationServiceMBean) MBeanProxyFactory.getProxy(RelationServiceMBean.class,
server, RELATION_SERVICE_NAME);
  -    }
  -
  -    public static DependencyServiceMBean getDependencyService(MBeanServer server) {
  -        return (DependencyServiceMBean) MBeanProxyFactory.getProxy(DependencyServiceMBean.class,
server, DEPENDENCY_SERVICE_NAME);
       }
   }
  
  
  
  1.13      +2 -3      incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBean.java
  
  Index: GeronimoMBean.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/GeronimoMBean.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- GeronimoMBean.java	4 Jan 2004 23:45:09 -0000	1.12
  +++ GeronimoMBean.java	22 Jan 2004 08:10:27 -0000	1.13
  @@ -80,7 +80,6 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.geronimo.kernel.classspace.ClassSpaceUtil;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
   import org.apache.geronimo.kernel.management.NotificationType;
   import org.apache.geronimo.kernel.jmx.MBeanOperationSignature;
   
  @@ -150,7 +149,7 @@
       public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
{
           super.preRegister(server, name);
           if (mbeanInfo == null) {
  -            throw new DeploymentException("No MBean info set for Geronimo MBean");
  +            throw new Exception("No MBean info set for Geronimo MBean");
           }
   
           classLoader = ClassSpaceUtil.getClassLoader(server, classSpace);
  
  
  
  1.6       +1 -31     incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/ParserUtil.java
  
  Index: ParserUtil.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/kernel/src/java/org/apache/geronimo/kernel/service/ParserUtil.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ParserUtil.java	16 Nov 2003 00:43:24 -0000	1.5
  +++ ParserUtil.java	22 Jan 2004 08:10:27 -0000	1.6
  @@ -70,7 +70,6 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.apache.geronimo.kernel.deployment.DeploymentException;
   
   /**
    * @version $Revision$ $Date$
  @@ -381,24 +380,6 @@
           return editor;
       }
   
  -    public static Class[] translateArgs(String[] types, Object[] args, URI baseURI, ClassLoader
classloader)
  -            throws DeploymentException {
  -        Class[] clazz = new Class[types.length];
  -        for (int i = 0; i < types.length; i++) {
  -            try {
  -                clazz[i] = loadClass(types[i], classloader);
  -            } catch (ClassNotFoundException e) {
  -                throw new DeploymentException(e);
  -            }
  -
  -            Object value = args[i];
  -            if (value instanceof String) {
  -                value = getValue(clazz[i], (String) value, baseURI);
  -                args[i] = value;
  -            }
  -        }
  -        return clazz;
  -    }
   
       public static Object instantiate(Class clazz, Object[] args, Class[] types)
               throws InvocationTargetException,
  @@ -409,16 +390,5 @@
           return c.newInstance(args);
       }
   
  -    public static Object instantiate(String className, Object[] args, String[] types, URI
baseURI, ClassLoader cl)
  -            throws DeploymentException,
  -            ClassNotFoundException,
  -            NoSuchMethodException,
  -            InvocationTargetException,
  -            InstantiationException,
  -            IllegalAccessException {
  -        Class[] typeClazz = translateArgs(types, args, baseURI, cl);
  -        Class clazz = cl.loadClass(className);
  -        return instantiate(clazz, args, typeClazz);
  -    }
   }
   
  
  
  

Mime
View raw message