diff options
-rw-r--r-- | sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java b/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java index 8c58ef0cf9..35543a87fe 100644 --- a/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java +++ b/sca-java-2.x/trunk/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java @@ -708,6 +708,16 @@ public class SpringXMLComponentTypeLoader { List<SpringSCAPropertyElement> scaproperties, Monitor monitor) throws ContributionReadException { + // The value of the @name attribute of an <sca:service/> subelement of a <beans/> element + // MUST be unique amongst the <service/> subelements of the <beans/> element. + for (SpringSCAServiceElement serviceElement : services) { + for (SpringSCAServiceElement x : services) { + if (serviceElement != x && serviceElement.getName().equals(x.getName())) { + error(monitor, "ScaServiceNameNotUnique", beans); + } + } + } + // The @target attribute of a <service/> subelement of a <beans/> element // MUST have the value of the @name attribute of one of the <bean/> // subelements of the <beans/> element. |