geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service ServiceDeploymentPlanner.java
Date Wed, 20 Aug 2003 22:42:24 GMT
dain        2003/08/20 15:42:24

  Modified:    modules/core/src/java/org/apache/geronimo/deployment/service
                        ServiceDeploymentPlanner.java
  Log:
  Added code to set the baseURI in MBeanMetadata objects.
  
  Revision  Changes    Path
  1.6       +14 -3     incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service/ServiceDeploymentPlanner.java
  
  Index: ServiceDeploymentPlanner.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/deployment/service/ServiceDeploymentPlanner.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ServiceDeploymentPlanner.java	18 Aug 2003 22:13:18 -0000	1.5
  +++ ServiceDeploymentPlanner.java	20 Aug 2003 22:42:24 -0000	1.6
  @@ -57,6 +57,8 @@
   
   import java.io.IOException;
   import java.io.InputStream;
  +import java.net.URI;
  +import java.net.URISyntaxException;
   import java.net.URL;
   import java.util.Collection;
   import java.util.HashSet;
  @@ -77,6 +79,8 @@
   import javax.xml.parsers.DocumentBuilderFactory;
   import javax.xml.parsers.ParserConfigurationException;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.apache.geronimo.deployment.DeploymentException;
   import org.apache.geronimo.deployment.goal.DeployURL;
   import org.apache.geronimo.deployment.goal.DeploymentGoal;
  @@ -85,10 +89,9 @@
   import org.apache.geronimo.deployment.plan.CreateClassSpace;
   import org.apache.geronimo.deployment.plan.CreateMBeanInstance;
   import org.apache.geronimo.deployment.plan.DeploymentPlan;
  -import org.apache.geronimo.deployment.plan.DeploymentTask;
   import org.apache.geronimo.deployment.plan.DestroyMBeanInstance;
  -import org.apache.geronimo.deployment.plan.RegisterMBeanInstance;
   import org.apache.geronimo.deployment.plan.InitializeMBeanInstance;
  +import org.apache.geronimo.deployment.plan.RegisterMBeanInstance;
   import org.apache.geronimo.deployment.plan.StartMBeanInstance;
   import org.apache.geronimo.deployment.plan.StopMBeanInstance;
   import org.apache.geronimo.deployment.scanner.URLType;
  @@ -105,6 +108,7 @@
    * @version $Revision$ $Date$
    */
   public class ServiceDeploymentPlanner implements ServiceDeploymentPlannerMBean, MBeanRegistration
{
  +    private Log log = LogFactory.getLog(getClass());
       private MBeanServer server;
       private ObjectName objectName;
       private RelationServiceMBean relationService;
  @@ -166,6 +170,12 @@
       private boolean addURL(DeployURL goal, Set goals, Set plans) throws DeploymentException
{
           InputStream is;
           URL url = goal.getUrl();
  +        URI baseURI = null;
  +        try {
  +            baseURI = (new URI(url.toExternalForm())).normalize();
  +        } catch (URISyntaxException e) {
  +            throw new DeploymentException(e);
  +        }
           URLType type = goal.getType();
           if (type == URLType.RESOURCE) {
               if (!url.getPath().endsWith("-service.xml")) {
  @@ -227,6 +237,7 @@
               }
               metadata.setLoaderName(loaderName);
               metadata.setParentName(deploymentName);
  +            metadata.setBaseURI(baseURI);
               CreateMBeanInstance createTask = new CreateMBeanInstance(server, metadata);
               createPlan.addTask(createTask);
               InitializeMBeanInstance initTask = new InitializeMBeanInstance(server, metadata);
  
  
  

Mime
View raw message