diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-26 06:20:38 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-26 06:20:38 +0000 |
commit | 911069d0f429934349fa7b72160c864716fb011c (patch) | |
tree | 4c4f7c36ce59b7c7d38a2a3c578c41d84d250940 /java/sca | |
parent | 965e129717da78c4ac56531200631836b74758f4 (diff) |
Allowing multiple bindings on a service
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@829707 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r-- | java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java index b543e3347d..defafcddb7 100644 --- a/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java +++ b/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java @@ -71,6 +71,10 @@ public class StructuralURIBuilderImpl implements CompositeBuilder { Binding existed = bindingMap.put(binding.getName(), binding); // Check that multiple bindings do not have the same name if (existed != null && existed != binding) { + if(binding.getClass() != existed.getClass()) { + // Look for a binding of the same type + continue; + } if (contract instanceof Service) { Monitor.error(monitor, this, Messages.ASSEMBLY_VALIDATION, "MultipleBindingsForService", contract .getName(), binding.getName()); |