Author: vamsic007 Date: Tue Dec 5 11:03:02 2006 New Revision: 482740 URL: http://svn.apache.org/viewvc?view=rev&rev=482740 Log: GERONIMO-1657 CommandSupport doesn't bubble up the exception. Prints stacktrace 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/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Modified: geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java?view=diff&rev=482740&r1=482739&r2=482740 ============================================================================== --- geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java (original) +++ geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java Tue Dec 5 11:03:02 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/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java URL: http://svn.apache.org/viewvc/geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java?view=diff&rev=482740&r1=482739&r2=482740 ============================================================================== --- geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java (original) +++ geronimo/server/branches/1.2/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/local/CommandSupport.java Tue Dec 5 11:03:02 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()); } } }