Ant, you are right. Each binding under the same service/reference should
have a unique name, no matter if they are of the same type or not.
BTW, we should now compare binding types using the QName
(binding.getType()).
Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Monday, October 26, 2009 2:05 AM
To: <[email protected]>
Subject: Re: svn commit: r829707 -
/tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java
On Mon, Oct 26, 2009 at 6:20 AM, <[email protected]> wrote:
Author: lresende
Date: Mon Oct 26 06:20:38 2009
New Revision: 829707
URL: http://svn.apache.org/viewvc?rev=829707&view=rev
Log:
Allowing multiple bindings on a service
Modified:
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java
Modified:
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java?rev=829707&r1=829706&r2=829707&view=diff
==============================================================================
---
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java
(original)
+++
tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/StructuralURIBuilderImpl.java
Mon Oct 26 06:20:38 2009
@@ -71,6 +71,10 @@
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());
Can you explain this change a bit more? Isn't that now making it
possible to have multiple bindings with the same name, which seems
odd?
...ant