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

Simon Laws resolved TUSCANY-3257.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-2.0

Now works in 2.x

> @autowire=true should be ignored while other means are defined to refer a 
> target
> --------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3257
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3257
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>    Affects Versions: Java-SCA-2.0
>            Reporter: Ku Jun Guo
>             Fix For: Java-SCA-2.0
>
>
> When I ran the otest for SCA 2.x, the ASM_5021_TestCase failed to pass.
> It's testing the item [ASM50014]: 
> If @autowire="true", the autowire procedure MUST only be used
> if no target is identified by any of the other ways listed above. It is
> not an error if @autowire="true" and a target is also defined
> through some other means, however in this case the autowire
> procedure MUST NOT be used.
> the composite is like :
>  <component name="TestComponent1">
>               <implementation.composite name="test:TestComposite7"/>
>         <service name="Service1">
>               <interface.wsdl 
> interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
>         </service>
>         <property name="serviceName">service1</property>
>         <reference name="Reference1" autowire="true">
>               <interface.wsdl 
> interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
>               <binding.sca uri="TestComponent3/Service1"/>
>         </reference>
>     </component>
>     
>     <!-- This component is the target identified by the Component Type -->
>     <component name="TestComponent2">
>               <implementation.composite name="test:TestComposite1"/>
>         <service name="Service1">
>               <interface.wsdl 
> interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
>         </service>
>         <property name="serviceName">service2</property>
>     </component>    
>     
>     <!-- This component is the target identified by the reference -->
>     <component name="TestComponent3">
>               <implementation.composite name="test:TestComposite1"/>
>         <service name="Service1">
>               <interface.wsdl 
> interface="http://test.sca.oasisopen.org/#wsdl.porttype(Service1)"/>
>         </service>
>         <property name="serviceName">service3</property>
>     </component>    
> From my test, the reference1 was wired to both TestComponent2 and 
> TestComponent3.
> The expected result is :
> ASM_5021 request service1 operation1 invoked service3 operation1 invoked
> but the actual result is :
> ASM_5021 request service1 operation1 invoked service2 operation1 invoked 
> service3 operation1 invoked

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to