You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by va...@apache.org on 2006/12/05 20:04:39 UTC

svn commit: r482741 - in /geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin: jmx/JMXDeploymentManager.java local/CommandSupport.java

Author: vamsic007
Date: Tue Dec  5 11:04:39 2006
New Revision: 482741

URL: http://svn.apache.org/viewvc?view=rev&rev=482741
Log:
GERONIMO-1657 CommandSupport doesn't bubble up the exception. Prints stacktrace
  o Merging rev 482740 from branches\1.2
  o Modified the patch submitted by Prasad Kashyap to account for the code changes post submission.
  o Removed printStackTrace and the exception is passed on to the caller

Modified:
    geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
    geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java

Modified: geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?view=diff&rev=482741&r1=482740&r2=482741
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java (original)
+++ geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java Tue Dec  5 11:04:39 2006
@@ -165,7 +165,7 @@
             }
             CommandSupport.addWebURLs(kernel, result);
             return result.size() == 0 ? null : (TargetModuleID[]) result.toArray(new TargetModuleID[result.size()]);
-        } catch (NoSuchStoreException e) {
+        } catch (Exception e) {
             throw (TargetException) new TargetException(e.getMessage()).initCause(e);
         }
     }

Modified: geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?view=diff&rev=482741&r1=482740&r2=482741
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original)
+++ geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Tue Dec  5 11:04:39 2006
@@ -273,7 +273,7 @@
         return set.size() > 0;
     }
 
-    protected void addWebURLs(Kernel kernel) {
+    protected void addWebURLs(Kernel kernel) throws Exception{
         addWebURLs(kernel, moduleIDs);
     }
 
@@ -281,7 +281,7 @@
      * Given a list of TargetModuleIDs, figure out which ones represent web
      * modules and add a WebURL to each if possible.
      */
-    public static void addWebURLs(Kernel kernel, List moduleIDs) {
+    public static void addWebURLs(Kernel kernel, List moduleIDs) throws Exception{
         Set webApps = null;
         for (int i = 0; i < moduleIDs.size(); i++) {
             TargetModuleIDImpl id = (TargetModuleIDImpl) moduleIDs.get(i);
@@ -292,11 +292,7 @@
                 for (Iterator it = webApps.iterator(); it.hasNext();) {
                     AbstractName name = (AbstractName) it.next();
                     if(name.getName().get("name").equals(id.getModuleID())) {
-                        try {
-                            id.setWebURL(kernel.getAttribute(name, "URLFor").toString());
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                        }
+                        id.setWebURL(kernel.getAttribute(name, "URLFor").toString());
                     }
                 }
             }