You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Luciano Resende <lu...@gmail.com> on 2009/10/02 02:11:20 UTC
[2.x] Calculating Endpoints to promoted services
While bringing up the JSON-RPC Binding, I got some weird errors where
the binding wouldn't get started... after a quick investigation I
realized this is happening because of the binding was being configured
in a promoted service and not at the component level, and in this
scenario, the end point was only being configured with default sca
binding.
This DOES NOT work
<service name="EchoService" promote="EchoComponent">
<interface.java interface="echo.Echo"/>
<tuscany:binding.jsonrpc
uri="http://localhost:8085/SCADomain/EchoService"/>
</service>
<component name="EchoComponent">
<implementation.java class="echo.EchoComponentImpl"/>
</component>
This works OK
<component name="EchoComponent">
<implementation.java class="echo.EchoComponentImpl"/>
<service name="Echo">
<tuscany:binding.jsonrpc
uri="http://localhost:8085/SCADomain/EchoService"/>
</service>
</component>
I'll try to get a look at this tomorrow, but if someone that has been
working on Endpoints could shine some lights... I'd appreciate.
--
Luciano Resende
http://people.apache.org/~lresende
http://lresende.blogspot.com/
Re: [2.x] Calculating Endpoints to promoted services
Posted by ant elder <an...@apache.org>.
On Fri, Oct 2, 2009 at 4:46 PM, Raymond Feng <en...@gmail.com> wrote:
> We can produce a warning
> if it helps.
+1, a big one.
...ant
Re: [2.x] Calculating Endpoints to promoted services
Posted by Raymond Feng <en...@gmail.com>.
The spec also has the following statement:
4917 B.10 Domain
4918 An SCA Domain represents a set of Services providing an area of
Business functionality that is controlled
4919 by a single organization. As an example, for the accounts department in
a business, the SCA Domain
4920 might cover all finance-related functions, and it might contain a
series of composites dealing with specific
4921 areas of accounting, with one for Customer accounts, another dealing
with Accounts Payable.
4922 A Domain specifies the instantiation, configuration and connection of a
set of components, provided via
4923 one or more composite files. A Domain also contains Wires that connect
together the Components. A
4924 Domain does not contain promoted Services or promoted References, since
promotion has no meaning
4925 at the Domain level.
It's pretty clear that the promoted services/references at domain composite
level should be ignored. We can produce a warning
if it helps.
Thanks,
Raymond
--------------------------------------------------
From: "Simon Laws" <si...@googlemail.com>
Sent: Friday, October 02, 2009 6:56 AM
To: <de...@tuscany.apache.org>; <an...@apache.org>
Subject: Re: [2.x] Calculating Endpoints to promoted services
> Well we should either process it OR point out through a warning that
> it's being ignored. Silently ignoring it is what leads to confusion.
>
> What is the proposal to process? That we should assume that they
> configure the component references and services that they promote?
>
> From the example given it would seem that this is a valid way to
> configure a component service. However explicit words were put into
> the spec to apparently discount this at the domain leve. I'd like to
> get a sounding from one of the spec team on the implications of
> definition of composite services and references at the domain level as
> currently defined in the OASIS specs.
>
> On a purely technical note (which is probably not that relevant yet)
> we host service and reference endpoints and endpoint references on
> components. Composite services and references form part of the
> component type of a component that uses the composite through
> implementation.composite and hence that's where the endpoint and
> endpoint references are dealt with.
>
> Simon
Re: [2.x] Calculating Endpoints to promoted services
Posted by Simon Laws <si...@googlemail.com>.
On Fri, Oct 2, 2009 at 3:03 PM, ant elder <an...@apache.org> wrote:
> On Fri, Oct 2, 2009 at 2:56 PM, Simon Laws <si...@googlemail.com> wrote:
>
>> However explicit words were put into
>> the spec to apparently discount this at the domain leve.
>
> Are you referring to just the ones on line 3873 which Raymond pasted
> in or are there other mentions somewhere else?
>
> ...ant
>
No, just the ones Raymond pointed out. However I do remember some
discussion with the OSOA scheme for composite services/references at
the domain level and some issues that it causes. I think along the
lines of what I was talking about in terms of having to send
configuration down the promotion hierarchy instead of up it in this
one case. Am looking for mail on this list discussing it but no luck
yet.
Simon
Re: [2.x] Calculating Endpoints to promoted services
Posted by ant elder <an...@apache.org>.
On Fri, Oct 2, 2009 at 2:56 PM, Simon Laws <si...@googlemail.com> wrote:
> However explicit words were put into
> the spec to apparently discount this at the domain leve.
Are you referring to just the ones on line 3873 which Raymond pasted
in or are there other mentions somewhere else?
...ant
Re: [2.x] Calculating Endpoints to promoted services
Posted by Simon Laws <si...@googlemail.com>.
Well we should either process it OR point out through a warning that
it's being ignored. Silently ignoring it is what leads to confusion.
What is the proposal to process? That we should assume that they
configure the component references and services that they promote?
>From the example given it would seem that this is a valid way to
configure a component service. However explicit words were put into
the spec to apparently discount this at the domain leve. I'd like to
get a sounding from one of the spec team on the implications of
definition of composite services and references at the domain level as
currently defined in the OASIS specs.
On a purely technical note (which is probably not that relevant yet)
we host service and reference endpoints and endpoint references on
components. Composite services and references form part of the
component type of a component that uses the composite through
implementation.composite and hence that's where the endpoint and
endpoint references are dealt with.
Simon
Re: [2.x] Calculating Endpoints to promoted services
Posted by ant elder <an...@gmail.com>.
On Fri, Oct 2, 2009 at 5:14 AM, Raymond Feng <en...@gmail.com> wrote:
> This is expected per the OASIS spec:
>
> 3865 11.6.1 add To Domain-Level Composite
> 3866 This functionality adds the composite identified by a supplied URI to
> the Domain Level Composite. The
> 3867 supplied composite URI refers to a composite within an installed
> contribution. The composite's installed
> 3868 contribution determines how the composite's artifacts are resolved
> (directly and indirectly). The supplied
> 3869 composite is added to the domain composite with semantics that
> correspond to the domain-level
> 3870 composite having an <include> statement that references the supplied
> composite. All of the composites
> 3871 components become top-level components and the component services
> become externally visible
> 3872 services (eg. they would be present in a WSDL description of the
> Domain). The meaning of any promoted
> 3873 services and references in the supplied composite is not defined; since
> there is no composite scope
> 3874 outside the domain composite, the usual idea of promotion has no
> utility
>
> --------------------------------------------------
> From: "Luciano Resende" <lu...@gmail.com>
> Sent: Thursday, October 01, 2009 5:11 PM
> To: "tuscany-dev" <de...@tuscany.apache.org>
> Subject: [2.x] Calculating Endpoints to promoted services
>
>> While bringing up the JSON-RPC Binding, I got some weird errors where
>> the binding wouldn't get started... after a quick investigation I
>> realized this is happening because of the binding was being configured
>> in a promoted service and not at the component level, and in this
>> scenario, the end point was only being configured with default sca
>> binding.
>>
>> This DOES NOT work
>>
>> <service name="EchoService" promote="EchoComponent">
>> <interface.java interface="echo.Echo"/>
>> <tuscany:binding.jsonrpc
>> uri="http://localhost:8085/SCADomain/EchoService"/>
>> </service>
>>
>> <component name="EchoComponent">
>> <implementation.java class="echo.EchoComponentImpl"/>
>> </component>
>>
>> This works OK
>>
>> <component name="EchoComponent">
>> <implementation.java class="echo.EchoComponentImpl"/>
>> <service name="Echo">
>> <tuscany:binding.jsonrpc
>> uri="http://localhost:8085/SCADomain/EchoService"/>
>> </service>
>> </component>
>>
>> I'll try to get a look at this tomorrow, but if someone that has been
>> working on Endpoints could shine some lights... I'd appreciate.
>>
It does seem a bit odd to just ignore the binding configuration. If
there are no other spec comments about what to do in this situation
wouldn't it be better to have Tuscany use the binding as I'm sure
Luciano isn't going to be the last person getting confused by the
current Tuscany behaviour.
...ant
Re: [2.x] Calculating Endpoints to promoted services
Posted by Raymond Feng <en...@gmail.com>.
This is expected per the OASIS spec:
3865 11.6.1 add To Domain-Level Composite
3866 This functionality adds the composite identified by a supplied URI to
the Domain Level Composite. The
3867 supplied composite URI refers to a composite within an installed
contribution. The composite's installed
3868 contribution determines how the composite's artifacts are resolved
(directly and indirectly). The supplied
3869 composite is added to the domain composite with semantics that
correspond to the domain-level
3870 composite having an <include> statement that references the supplied
composite. All of the composites
3871 components become top-level components and the component services
become externally visible
3872 services (eg. they would be present in a WSDL description of the
Domain). The meaning of any promoted
3873 services and references in the supplied composite is not defined; since
there is no composite scope
3874 outside the domain composite, the usual idea of promotion has no
utility
--------------------------------------------------
From: "Luciano Resende" <lu...@gmail.com>
Sent: Thursday, October 01, 2009 5:11 PM
To: "tuscany-dev" <de...@tuscany.apache.org>
Subject: [2.x] Calculating Endpoints to promoted services
> While bringing up the JSON-RPC Binding, I got some weird errors where
> the binding wouldn't get started... after a quick investigation I
> realized this is happening because of the binding was being configured
> in a promoted service and not at the component level, and in this
> scenario, the end point was only being configured with default sca
> binding.
>
> This DOES NOT work
>
> <service name="EchoService" promote="EchoComponent">
> <interface.java interface="echo.Echo"/>
> <tuscany:binding.jsonrpc
> uri="http://localhost:8085/SCADomain/EchoService"/>
> </service>
>
> <component name="EchoComponent">
> <implementation.java class="echo.EchoComponentImpl"/>
> </component>
>
> This works OK
>
> <component name="EchoComponent">
> <implementation.java class="echo.EchoComponentImpl"/>
> <service name="Echo">
> <tuscany:binding.jsonrpc
> uri="http://localhost:8085/SCADomain/EchoService"/>
> </service>
> </component>
>
> I'll try to get a look at this tomorrow, but if someone that has been
> working on Endpoints could shine some lights... I'd appreciate.
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://lresende.blogspot.com/