tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luciano Resende <luckbr1...@gmail.com>
Subject [2.x] Accessing the reference binding information in a reference wired with @target attribute
Date Wed, 18 Nov 2009 01:53:45 GMT
While bringing up the Implementation.widget, I have found the
following scenario : A component that has couple references wired via
@target attribute, and all the binding information is available in the
target service.
   <component name="Store">
        <tuscany:implementation.widget location="uiservices/store.html"/>
        <service name="Widget">
        	<tuscany:binding.http uri="/store"/>
		<reference name="catalog" target="Catalog"/>
		 <reference name="shoppingCart" target="ShoppingCart/Cart"/>
		 <reference name="shoppingTotal" target="ShoppingCart/Total"/>

	<component name="Catalog">
		<implementation.java class="services.FruitsCatalogImpl"/>
		<property name="currencyCode">USD</property>
		<service name="Catalog">
		<reference name="currencyConverter" target="CurrencyConverter"/>	

In the past, I could easily get access to the binding configuration
via the RuntimeComponent (e.g component.getReferences.getBinding()).
With the recent changes around EndPoint and EndPointReference, how am
I supposed to get access to these info during a invocation of my
extension ? I have tried couple variations without success (e.g
component.getEndpointReferences().get(0).getBinding() which always
return null, and
component.getEndpointReferences().get(0).getTargetEndpoint() which is
always unresolved)

Because I know there are several changes being done on this area at
the moment, I want to double check what should be the expected
behavior and the right approach to access the binding configuration
for the reference on the scenario above, before I start making any
changes on the in flux code.

Luciano Resende

View raw message