[ 
https://issues.apache.org/jira/browse/TUSCANY-3942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Kurz reassigned TUSCANY-3942:
-----------------------------------

    Assignee: Scott Kurz

> Should <reference target="XXX> with empty child <binding.sca> element be 
> allowed?
> ---------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3942
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3942
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-2.x
>            Reporter: Scott Kurz
>            Assignee: Scott Kurz
>            Priority: Minor
>
> Should this be allowed? (I should have phrased this as "uri"-less 
> <binding.sca> rather than "empty")
>   
>  <reference target="targetService>
>    <binding.sca/>
>  </reference>
> I see this is specifically allowed in 
> EndpointReferenceBuilderImpl.bindingsIdentifyTargets(), so some thought went 
> into this (looks like Raymond wrote this):
>   if ((binding instanceof SCABinding) && (binding.getURI() == null))
>       continue;
> I can understand the thought process here, e.g. the context around ASM50026 
> involves avoiding ambiguity in resolving references, and since an empty, 
> uri-less <binding.sca> doesn't resolve the reference at all.. it doesn't 
> conflict with the target.
> However, the language in ASM50026 is plain and simple and seems to disallow 
> this, and doesn't make a special case for <binding.sca> without a @uri. 
> One problem with tolerating this syntax, (as we do today), is that, in 
> general, when using @target you don't get to select which binding to use, 
> from the reference side.    However I could see someone thinking that adding 
> the <binding.sca> child elem to the reference with @target value would imply 
> that the binding.sca should be used to do the invocation.   (ASM50012 implies 
> this).   So it's unclear if this should have this behavior making the app 
> implementation-dependent.
> From a purely Tuscany-only viewpoint I can even see the value of tolerating 
> this... however it's such a simple case syntax-wise, and the spec is clearly 
> trying to specify the correct vs. incorrect behavior... so I do think we 
> should try to follow the letter of the spec in this instance.  
> I tried to find some earlier discussion here, this is all I found which 
> didn't seem to help much (except to make me wonder if there is some other use 
> case, maybe involving callbacks, complicating this.. but I can't think of it):
>  
> https://issues.apache.org/jira/browse/TUSCANY-3013
> Thoughts?
> Thanks, Scott

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to