You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2008/10/17 09:50:44 UTC

[jira] Updated: (TUSCANY-2617) Autowire applies to references with targets

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

Simon Laws updated TUSCANY-2617:
--------------------------------

    Fix Version/s: Java SCA-1.3.3

I want to put this change into 1.3.3 also

> Autowire applies to references with targets
> -------------------------------------------
>
>                 Key: TUSCANY-2617
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2617
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Assembly Model
>            Reporter: Brent Daniel
>            Assignee: Simon Laws
>             Fix For: Java SCA-1.3.3
>
>
> If Autowire="true" is specified on a component with multiple references, some of which have targets, the runtime will autowire all references rather than only the ones without targets. 
> For example, in the composite below "candyCatalog" and "fruitsCatalog" will be autowired in addition to "currencyConverter". 
> <composite	xmlns="http://www.osoa.org/xmlns/sca/1.0"
> 			targetNamespace="http://soa.sca.samples.candystore/catalog"
> 		    name="StoreSupplierCatalogInnerComposite">
> 		    
>     <service name="Catalog" promote="StoreSupplierCatalogInner/Catalog">
>         <interface.java interface="soa.sca.samples.candystore.Catalog"/>
>         <binding.ws/>
>     </service>
>  	<component name="StoreSupplierCatalogInner" autowire="true" >
> 		<implementation.java class="soa.sca.samples.candystore.merger.MergedCatalogImpl"/> 
> 		<property name="currencyCode">USD</property>
> 		
> 		<reference name="candyCatalog" target="StoreCandyCatalog"/>
> 		<reference name="fruitsCatalog" target="FruitsCatalog"/>
> 		
> 		<!-- Since we are using autowire we do not need to specify a target -->
> 		<reference name="currencyConverter" />
> 	</component>
> 	<component name="FruitsCatalog">
> 		<implementation.java class="soa.sca.samples.candystore.FruitsCatalogImpl"/>
> 		<property name="currencyCode">USD</property>
> 		<reference name="currencyConverter" target="StoreCurrencyConverter"/>	
> 	</component>
> 	<component name="StoreCandyCatalog">
> 		<implementation.java class="soa.sca.samples.candystore.CandyCatalogImpl"/>
> 		<property name="currencyCode">USD</property>
> 		<reference name="currencyConverter" target="StoreCurrencyConverter"/>	
> 	</component>
>  	
>     <component name="StoreCurrencyConverter">
> 		<implementation.java class="soa.sca.samples.candystore.CurrencyConverterImpl"/>
> 	</component>   
>  	
> </composite>

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