[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tuscany-user
Subject:    Re: Issue with binding on service element that promotes a component?
From:       Gary Brown <gary () pi4tech ! com>
Date:       2011-05-31 9:17:58
Message-ID: BANLkTinaj2d15b_qxLCQQsWCZ6U97Wb1PQ () mail ! gmail ! com
[Download RAW message or body]

Thanks for the clarification.

Regards
Gary

On Mon, May 30, 2011 at 1:31 PM, Simon Nash <nash@apache.org> wrote:
> Gary Brown wrote:
>>
>> Hi
>>
>> I have been experimenting with adding a binding, using the example
>> supplied with tuscany 2.0.Beta2. All works fine when the binding is
>> contained in a service element within the component, however when I
>> try to add an external service element to promote the component, and
>> move the binding to that external service element, it appears to be
>> ignored.
>>
>> <composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
>>
>>               xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
>>
>>           targetNamespace="http://itest"
>>
>>           name="HelloWorldComposite">
>>
>>
>>    <service name="HelloWorldService" promote="HelloWorldComponent" >
>>
>>        <tuscany:binding.sample someAttr="bla" />
>>
>>    </service>
>>
>>
>>    <component name="HelloWorldComponent">
>>
>>        <implementation.java class="helloworld.HelloWorldImpl"/>
>>
>>        <service name="HelloWorldService" />
>>    </component>
>>
>>
>>
>>    <component name="HelloWorldClient">
>>
>>        <implementation.java class="helloworld.HelloWorldClient"/>
>>
>>        <reference name="ref" >
>>
>>            <tuscany:binding.sample
>> uri="HelloWorldComponent/HelloWorldService"/>
>>
>>        </reference>
>>
>>    </component>
>>
>>
>>
>> </composite>
>>
>>
>> Found a similar problem mentioned here:
>> http://www.mail-archive.com/user@tuscany.apache.org/msg01994.html
>>
>> Interestingly the reference binding provider is also not instantiated,
>> so wondering whether this sample binding is only intended for use
>> within a composite - i.e. because there is no service defined with the
>> binding type, the reference is ignored? If so, possibly this is the
>> underlying reason that the binding cannot be used for the external
>> service? If so, what needs to be added to the binding to make it
>> usable for external services?
>>
>> Not sure if this is a known issue, or whether I have something wrong
>> with my binding, as there does not appear to be any examples in the
>> 2.0.Beta2 distribution that uses a binding (e.g. binding.ws) in an
>> external service element?
>>
>> Regards
>> Gary
>>
>>
> Hi Gary,
> This promoted service configuration approach works in Tuscany 1.x,
> which implements the SCA 1.0 spec.
>
> The SCA 1.1 spec was clarified by the OASIS TC to say that any
> promoted service configuration must be ignored for a top-level
> composite deployed into the domain.  Tuscany 2.0 complies with
> the SCA 1.1 spec, so this implementation was changed accordingly.
>
> For Tuscany 2.0 you'll need to put the binding configuration on
> the component service.  This also works on Tuscany 1.x.
>
>  Simon
>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic