Yilmaz Eldogan wrote:
Hello,
my name is Yilmaz Eldogan and I have a question regarding the
Store-Example in the Tuscany-Bin-Directory\samples\store folder.
In the composite-file of the example you can see the
CurrencyConverter-Component with these lines:
/<component name="CurrencyConverter">
<implementation.java class="services.CurrencyConverterImpl"/>
</component> /
But you can see in the SCA-Diagram that this component is proposing a
service to the Catalog-Component.
How it comes that this service isn´t included in the composite-file with
service-tags? I´m wondering if this might be an error?
Bye,
Yilmaz
>
Hi Yilmaz,
This isn't an error. In SCA, services are defined by the implementation
and can optionally be configured in the .composite file. In this case,
the CurrencyConverterImpl class implements the CurrencyConverter interface,
and the CurrencyConverter interface has the @Remotable annotation. By the
SCA Java rules, this creates a service named CurrencyConverter, and this
service has the default SCA binding.
If the component assembler wants to configure this service with a different
binding (such as binding.ws), the service would need to appear in the
.composite file. if the component assembler is happy to expose this service
using the default SCA binding, it doesn't need to appear in the composite file.
Simon