tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Sebastien Delfino <jsdelf...@apache.org>
Subject Re: How to tell if a component reference is promoted by a comosite reference?
Date Sat, 14 Apr 2007 14:51:20 GMT
Venkat,

comments inline.

Venkata Krishnan wrote:
> Hi,
>
> What I menetion here is only from the perspective of the 'future' plan 
> for
> this.
>
>> From what I understand of the assembly model, I am not so comfortable 
>> about
> adding 'promotedAs'.  There are probably two options that I can think of
> which is 1) add the Composite Reference name to the 'tagets' list of the
> component reference or 2) maintain a map in CompositeUtil with
> ComponentReference->PromotedReference relationship just to be used in the
> 'wire' method.
>
> Thanks
>

I agree with you. Like I said earlier in that thread I'm not too keen on 
having two relationships mirroring each other in the model, and I also 
think that the more natural relationship to keep is the 
CompositeReference --> ComponentReference one. The good news is that 
I've looked at the Deployer code to try to fix some of the problems I 
was seeing handling nested composites, and with the changes I started to 
make to it yesterday, I don't really a use case for having this 
promotedAs relationship anymore. So, if I manage to simplify the code in 
Deployer a little bit further today, we will be able to remove this 
promotedAs.

> - Venkat
>
> On 4/13/07, Jean-Sebastien Delfino <jsdelfino@apache.org> wrote:
>>
>> Simon Laws wrote:
>> > On 4/13/07, Raymond Feng <enjoyjava@gmail.com> wrote:
>> >>
>> >> Hi,
>> >>
>> >> With the current assembly model, how can we tell if a component
>> >> reference
>> >> is
>> >> promoted by a comosite reference? I can get all the promoted 
>> references
>> >> from
>> >> CompositeReference but not the other way.
>> >>
>> >> Thanks,
>> >> Raymond
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> >> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>> >>
>> >> If the model is a true reflection of what appears in the SCDL then I
>> > assume you would have to loop over all the references in the composite
>> > that
>> > contains the component in question and test if the componet 
>> reference is
>> > being promoted. I know that isn't telling you anything you don't 
>> already
>> > know but it's just and excuse to add a related question to this thread
>> >
>> > Is the philosophy with the assembly model to have it represent 
>> precisely
>> > what appears in the SCDL or is there room to include value add, for
>> > example,
>> > links from components references to the composite references that
>> promote
>> > them?
>> >
>> > Simon
>> >
>>
>> We currently have: CompositeReference.promotedReferences --> 0..n
>> ComponentReference.
>>
>> We could have the relationship in the other direction:
>> ComponentReference.promotedAs --> 0..n CompositeReference.
>>
>> In the future, I would prefer to have only one of the two above
>> relationships (to avoid confusion with which one needs to be populated
>> when you read or construct model instances), but maybe we can add the
>> second relationship for now and populate it in CompositeUtil.wire().
>>
>> Would that help?
>>
>> -- 
>> Jean-Sebastien
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>>
>>
>


-- 
Jean-Sebastien


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


Mime
View raw message