Allowing multiple bindings on a service

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@829707 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
lresende 2009-10-26 06:20:38 +00:00
parent 965e129717
commit 911069d0f4

View file

@ -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());