geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jboy...@apache.org
Subject svn commit: rev 47537 - in geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment: . plugin/local
Date Thu, 30 Sep 2004 03:26:42 GMT
Author: jboynes
Date: Wed Sep 29 20:26:42 2004
New Revision: 47537

Modified:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
Log:
Deployer returns URIs not Strings; add a bit more logging

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/Deployer.java
Wed Sep 29 20:26:42 2004
@@ -150,7 +150,7 @@
                     List deployedURIs = new ArrayList(childURIs.size() + 1);
                     deployedURIs.add(uri);
                     deployedURIs.addAll(childURIs);
-                    return childURIs;
+                    return deployedURIs;
                 }
                 return Collections.EMPTY_LIST;
             } catch (InvalidConfigException e) {

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/DistributeCommand.java
Wed Sep 29 20:26:42 2004
@@ -25,6 +25,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
+import java.net.URI;
 import javax.enterprise.deploy.shared.CommandType;
 import javax.enterprise.deploy.spi.Target;
 import javax.enterprise.deploy.spi.TargetModuleID;
@@ -32,6 +33,7 @@
 
 import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
 import org.apache.geronimo.deployment.util.FileUtil;
+import org.apache.geronimo.deployment.DeploymentException;
 import org.apache.geronimo.kernel.KernelMBean;
 
 /**
@@ -92,17 +94,26 @@
 
             Object[] args = {moduleArchive, deploymentPlan};
             List objectNames = (List) kernel.invoke(deployer, "deploy", args, DEPLOY_SIG);
+            System.err.println("deploy returned id " + objectNames.get(0));
             if (objectNames != null && !objectNames.isEmpty()) {
-                String parentName = (String) objectNames.get(0);
-
-                List childNames = objectNames.subList(1, objectNames.size());
-                String[] childIDs = (String[]) childNames.toArray(new String[childNames.size()]);
+                String parentName = ((URI) objectNames.get(0)).toString();
+                String[] childIDs = new String[objectNames.size()-1];
+                for (int j=0; j < childIDs.length; j++) {
+                    childIDs[j] = ((URI)objectNames.get(j+1)).toString();
+                }
 
                 TargetModuleID moduleID = new TargetModuleIDImpl(targetList[0], parentName.toString(),
childIDs);
+                System.err.println("Distributed moduleId " + moduleID);
                 addModule(moduleID);
+            } else {
+                DeploymentException deploymentException = new DeploymentException("Got empty
list");
+                deploymentException.printStackTrace();
+                throw deploymentException;
             }
             complete("Completed");
         } catch (Exception e) {
+            e.printStackTrace();
+            System.err.println(e.getMessage());
             doFail(e);
         } finally {
             if (spool) {

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/local/StartCommand.java
Wed Sep 29 20:26:42 2004
@@ -44,6 +44,7 @@
                 TargetModuleID module = modules[i];
 
                 URI moduleID = URI.create(module.getModuleID());
+                System.err.println("Starting module " + moduleID);
                 kernel.startConfiguration(moduleID);
                 addModule(module);
             }

Mime
View raw message