[jboss-svn-commits] JBL Code SVN: r22438 - labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Sep 5 09:47:56 EDT 2008


Author: kevin.conner at jboss.com
Date: 2008-09-05 09:47:56 -0400 (Fri, 05 Sep 2008)
New Revision: 22438

Modified:
   labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
Log:
Remove trap of ConfigurationException: JBESB-1993

Modified: labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2008-09-05 13:07:41 UTC (rev 22437)
+++ labs/jbossesb/branches/JBESB_4_4_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java	2008-09-05 13:47:56 UTC (rev 22438)
@@ -57,7 +57,6 @@
     /**
      * XMLBeans based configuration model instance.
      */
-    @SuppressWarnings("unused")
     private XMLBeansModel model;
 
     /**
@@ -83,28 +82,24 @@
         root = YADOMUtil.addElement(doc, "jbossesb-gateways");
         root.setAttribute("parameterReloadSecs", model.getParameterReloadSecs());
 
-        try {
-	        List<Service> services = model.getServices();
-	        HashMap<String, HashMap> hm = new HashMap<String, HashMap>();
-	        for (Service service : services) {
-	        	if (hm.containsKey(service.getCategory())) {
-	        		HashMap<String, String> hc = hm.get(service.getCategory());
-	        		
-	        		if (hc.containsKey(service.getName())) {
-	        			throw new ConfigurationException("Service names must be unique within a category.  "
-	        					+ "The service name " + service.getName()
-	        					+ " is already defined within the " + service.getCategory() + " category.");
-	        		} else {
-	        			hc.put(service.getName(), service.getName());
-	        		}
-	        	} else {
-	        		HashMap <String,String> hc = new HashMap<String,String>();
-	        		hc.put(service.getName(), service.getName());
-	        		hm.put(service.getCategory(), hc);
-	        	}
-	        }
-        } catch (ConfigurationException ce) {
-        	logger.error("", ce);
+        List<Service> services = model.getServices();
+        HashMap<String, HashMap<String, String>> hm = new HashMap<String, HashMap<String, String>>();
+        for (Service service : services) {
+        	if (hm.containsKey(service.getCategory())) {
+        		HashMap<String, String> hc = hm.get(service.getCategory());
+        		
+        		if (hc.containsKey(service.getName())) {
+        			throw new ConfigurationException("Service names must be unique within a category.  "
+        					+ "The service name " + service.getName()
+        					+ " is already defined within the " + service.getCategory() + " category.");
+        		} else {
+        			hc.put(service.getName(), service.getName());
+        		}
+        	} else {
+        		HashMap <String,String> hc = new HashMap<String,String>();
+        		hc.put(service.getName(), service.getName());
+        		hm.put(service.getCategory(), hc);
+        	}
         }
         
         // Iterate over all the gateway configs and map them to the gateway configuration...




More information about the jboss-svn-commits mailing list