[jboss-svn-commits] JBL Code SVN: r23697 - labs/jbossesb/branches/JBESB_4_2_1_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
Tue Nov 4 13:34:57 EST 2008
Author: tfennelly
Date: 2008-11-04 13:34:56 -0500 (Tue, 04 Nov 2008)
New Revision: 23697
Modified:
labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
Log:
Merge of https://jira.jboss.org/jira/browse/JBESB-1459 from trunk
Modified: labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java 2008-11-04 15:04:44 UTC (rev 23696)
+++ labs/jbossesb/branches/JBESB_4_2_1_GA_CP/product/rosetta/src/org/jboss/soa/esb/listeners/config/GatewayGenerator.java 2008-11-04 18:34:56 UTC (rev 23697)
@@ -85,13 +85,22 @@
try {
List<Service> services = model.getServices();
- HashMap<String, String> hm = new HashMap<String, String>();
+ HashMap<String, HashMap> hm = new HashMap<String, HashMap>();
for (Service service : services) {
- if (hm.containsKey(service.getName())) {
- throw new ConfigurationException("Service names must be unique. The service name " + service.getName()
- + " is already defined within the <services> tag.");
+ 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 {
- hm.put(service.getName(), service.getName());
+ HashMap <String,String> hc = new HashMap<String,String>();
+ hc.put(service.getName(), service.getName());
+ hm.put(service.getCategory(), hc);
}
}
} catch (ConfigurationException ce) {
More information about the jboss-svn-commits
mailing list