Hi,

Am 24.10.2011 um 10:14 schrieb David Feliot:

> Hi,
> 
> when defining a service property with a reference as a value, the property is 
> assigned with a ServiceProxyWrapper (inner class of ReferenceRecipe).
> 
> Here is the way it is defined:
> 
> <service ref="..." interface="...">
> <service-properties>
> <entry key="Property1">
> <ref component-id="serviceRef"/>
> </entry>
> </service-properties>
> </service>
> 
> <reference id="serviceRef" interface="A" />
> 
> I would have expected the service property "Property1" to be assigned with an 
> instance of "A" instead of a ServiceProxyWrapper. However I could get the 
> instance of "A" by calling the method 'convert' and passing a ReifiedType.

I would assume that the actual ServiceProxyWrapper object passed in actually 
*is* and instance of A as in "xyz instanceof A". Otherwise it would be a 
violation of the spec etc. The actual class of the supplied object is none of 
the consumer's business.

There is no need to unwrap IMHO.

Regards
Felix


> 
> I would like to know if defining such a service property (containing a <ref>) 
> is correct according to Blueprint specification and Aries implementation?
> 
> I would also like to know why the 'convert' has to be done explicitly?
> 
> Thank you.
> Regards,
> David
> 
> 
> 

Reply via email to