You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Raymond Feng <en...@gmail.com> on 2007/04/30 20:32:53 UTC

Create self-references for a component/componentType

Hi,

The ComponentContext API defines a method to create self reference to a 
component service. Would it make sense that we create self-references for 
all the services for a component/componentType during the "wire" phase of 
the assembly model? If so, we will be able to handle the runtime invocation 
chains consistently.

Let's assume there's a service in the component type:

name: MyService
bindings: SCA binding and WS binding

Then the self reference will be created on the component type as follows.

name: $self$_MyService (something derived from the service name)
bindings: SCA binding and WS binding
target: The corresponding component service for MyService with a name 
<MyComponent>/MyService
wiredByImpl/autowire: true

Please note that we need to have the component name (not available from the 
componentType) to add the target.

Thanks,
Raymond



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Create self-references for a component/componentType

Posted by Raymond Feng <en...@gmail.com>.
Hi, Sebastien.

I just committed a change in the CompositeUtil with the 
createSelfReferences(Component ...), but it's not hooked yet. Would you 
please help to get it integrated?

Thanks,
Raymond

----- Original Message ----- 
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Tuesday, May 01, 2007 10:33 AM
Subject: Re: Create self-references for a component/componentType


> Raymond Feng wrote:
>> Hi,
>>
>> The ComponentContext API defines a method to create self reference to a 
>> component service. Would it make sense that we create self-references for 
>> all the services for a component/componentType during the "wire" phase of 
>> the assembly model? If so, we will be able to handle the runtime 
>> invocation chains consistently.
>>
>> Let's assume there's a service in the component type:
>>
>> name: MyService
>> bindings: SCA binding and WS binding
>>
>> Then the self reference will be created on the component type as follows.
>>
>> name: $self$_MyService (something derived from the service name)
>> bindings: SCA binding and WS binding
>> target: The corresponding component service for MyService with a name 
>> <MyComponent>/MyService
>> wiredByImpl/autowire: true
>>
>> Please note that we need to have the component name (not available from 
>> the componentType) to add the target.
>>
>> Thanks,
>> Raymond
>>
>>
>
> That makes sense to me. I can help and add the code to create these self 
> references during the wiring phase if you want.
>
> -- 
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Create self-references for a component/componentType

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Raymond Feng wrote:
> Hi,
>
> The ComponentContext API defines a method to create self reference to 
> a component service. Would it make sense that we create 
> self-references for all the services for a component/componentType 
> during the "wire" phase of the assembly model? If so, we will be able 
> to handle the runtime invocation chains consistently.
>
> Let's assume there's a service in the component type:
>
> name: MyService
> bindings: SCA binding and WS binding
>
> Then the self reference will be created on the component type as follows.
>
> name: $self$_MyService (something derived from the service name)
> bindings: SCA binding and WS binding
> target: The corresponding component service for MyService with a name 
> <MyComponent>/MyService
> wiredByImpl/autowire: true
>
> Please note that we need to have the component name (not available 
> from the componentType) to add the target.
>
> Thanks,
> Raymond
>
>

That makes sense to me. I can help and add the code to create these self 
references during the wiring phase if you want.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org