[ https://issues.apache.org/jira/browse/TUSCANY-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ant elder updated TUSCANY-2584: ------------------------------- Fix Version/s: Java-SCA-Next > Problems using one composite as an implementation for two components > -------------------------------------------------------------------- > > Key: TUSCANY-2584 > URL: https://issues.apache.org/jira/browse/TUSCANY-2584 > Project: Tuscany > Issue Type: Bug > Affects Versions: Java-SCA-1.3 > Reporter: Tobias Arnold > Fix For: Java-SCA-Next > > > I tried to use the same composite as an implementation for two different > components. In detail i tried to have two instances of the store example > sharing the implementation for the currency converter. When i start the nodes > for the two shops no erros are displayed. But in one of the shops the > currency converter doesn't work (catalog isn't displayed). If i undeploy the > composite of the working shop, the other shop works too, but not both at the > same time. I exported and imported the composite namepsace via the > sca-contribution.xml. > Here are the composites I used: > store1: > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" > xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" > targetNamespace="http://store2" > xmlns:store3="http://store3" > name="store2"> > > <component name="Store"> > <t:implementation.widget location="uiservices/store.html"/> > <service name="Widget"> > <t:binding.http uri="/store"/> > </service> > <reference name="catalog" target="Catalog"> > <t:binding.jsonrpc/> > </reference> > <reference name="shoppingCart" target="ShoppingCart/Cart"> > <t:binding.atom/> > </reference> > <reference name="shoppingTotal" target="ShoppingCart/Total"> > <t:binding.jsonrpc/> > </reference> > </component> > > <component name="Catalog"> > <implementation.java class="services.FruitsCatalogImpl"/> > <property name="currencyCode">USD</property> > <service name="Catalog"> > <t:binding.jsonrpc/> > </service> > <reference name="currencyConverter" > target="CurrencyConverter/CurrencyService"/> > </component> > > <component name="ShoppingCart"> > <implementation.java class="services.ShoppingCartImpl"/> > <service name="Cart"> > <t:binding.atom uri="/ShoppingCart/Cart"/> > </service> > <service name="Total"> > <t:binding.jsonrpc/> > </service> > </component> > > <component name="CurrencyConverter"> > <implementation.composite name="store3:store3"/> > </component> > </composite> > store2: > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" > xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" > targetNamespace="http://store1" > xmlns:store3="http://store3" > name="store1"> > > <component name="Store1"> > <t:implementation.widget location="uiservices/store.html"/> > <service name="Widget"> > <t:binding.http uri="/store"/> > </service> > <reference name="catalog" target="Catalog1"> > <t:binding.jsonrpc/> > </reference> > <reference name="shoppingCart" target="ShoppingCart1/Cart"> > <t:binding.atom/> > </reference> > <reference name="shoppingTotal" target="ShoppingCart1/Total"> > <t:binding.jsonrpc/> > </reference> > </component> > > <component name="Catalog1"> > <implementation.java class="services.FruitsCatalogImpl"/> > <property name="currencyCode">USD</property> > <service name="Catalog"> > <t:binding.jsonrpc/> > </service> > <reference name="currencyConverter" > target="CurrencyConverter1/CurrencyService"/> > </component> > > <component name="ShoppingCart1"> > <implementation.java class="services.ShoppingCartImpl"/> > <service name="Cart"> > <t:binding.atom uri="/ShoppingCart1/Cart"/> > </service> > <service name="Total"> > <t:binding.jsonrpc/> > </service> > </component> > > <component name="CurrencyConverter1"> > <implementation.composite name="store3:store3"/> > </component> > </composite> > shared: > <composite xmlns="http://www.osoa.org/xmlns/sca/1.0" > xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" > targetNamespace="http://store3" > name="store3"> > > <service name="CurrencyService" promote="CurrencyConverter3"> > <interface.java interface="services.CurrencyConverter"/> > </service> > > <component name="CurrencyConverter3"> > <implementation.java class="services.CurrencyConverterImpl"/> > </component> > </composite> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.