You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Kevin Williams <kj...@gmail.com> on 2007/05/01 22:33:36 UTC

Re: cross-composite locate service

I am creating a test case for this and it seems that there is currently no
API for "adding deployable composites".  Is this work underway?  I may be
able to help out here.

Thanks,
--Kevin

On 4/23/07, Kevin Williams <kj...@gmail.com> wrote:
>
> Thanks Raymond.  That may work for me.  I'll try it out.
> --
> Kevin
>
> On 4/20/07, Raymond Feng <enjoyjava@gmail.com > wrote:
> >
> > Hi, Kevin,
> >
> > When one ore more deployable composites from a contribution are added to
> > the
> > SCA domain, all the components in the composite will become direct
> > children
> > of the SCA domain composite (the include semantics).
> >
> > Then similar code as follows will fit your case. Am I right?
> >
> > ComponentContext context =
> > SCARuntime.getComponentContext("CalculatorServiceComponent");
> > ServiceReference<CalculatorService> service =
> > context.createSelfReference(CalculatorService.class);
> > CalculatorService calculatorService = service.getService();
> >
> > Thanks,
> > Raymond
> >
> > ----- Original Message -----
> > From: "Kevin Williams" <kj...@gmail.com>
> > To: < tuscany-dev@ws.apache.org>
> > Sent: Friday, April 20, 2007 2:03 PM
> > Subject: cross-composite locate service
> >
> >
> > >I am interested in a way to dynamically find and invoke a service
> > within
> > >the
> > > Domain without having access to a pre-defined reference.  This is not
> > > called
> > > out in the 1.0 specification but it would be a very useful
> > capability.  It
> > > also seems that many of the pieces required to implement this may soon
> > be
> > > in
> > > place; especially with the work around runtime simplification and
> > Domain
> > > proposed by Raymond in this thread:
> > >
> > > http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg16792.html
> > >
> > > This also seems related to Scott's recent query regarding default
> > bindings
> > > across top level composites:
> > >
> > > *http://tinyurl.com/2xslxp*
> > >
> > > Any thoughts on this?  I would appreciate any pointers.
> > >
> > > Thanks!
> > >
> > > --Kevin
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>

Re: cross-composite locate service

Posted by Kevin Williams <kj...@gmail.com>.
Here is a concrete scenario ...

Two composites A, B in the SCA Domain

A has single component a
B has single component b

a provides a.service
b provides b.service

a_impl.service must delegate to b_impl.service

A provides no defined reference to b.service so a_impl will dynamically find
and invoke b.service

Based on Raymond's earlier comment in this thread

AImpl implements A {

    service() {

        ComponentContext context = SCARuntime.getComponentContext("b")
        ServiceReference<b> service = context.createSelfReference(b.class)
        BService bService = service.getService()

        return bService.service

    }
}


Will SCARuntime continue to provide "getComponentContext" or is some
domain-related-interface needed?  Are there plans for the infrastructure
required to implement it?

Thanks,

--Kevin

On 5/1/07, Kevin Williams <kj...@gmail.com> wrote:
>
> I am creating a test case for this and it seems that there is currently no
> API for "adding deployable composites".  Is this work underway?  I may be
> able to help out here.
>
> Thanks,
> --Kevin
>
> On 4/23/07, Kevin Williams <kj...@gmail.com> wrote:
> >
> > Thanks Raymond.  That may work for me.  I'll try it out.
> > --
> > Kevin
> >
> > On 4/20/07, Raymond Feng <enjoyjava@gmail.com > wrote:
> > >
> > > Hi, Kevin,
> > >
> > > When one ore more deployable composites from a contribution are added
> > > to the
> > > SCA domain, all the components in the composite will become direct
> > > children
> > > of the SCA domain composite (the include semantics).
> > >
> > > Then similar code as follows will fit your case. Am I right?
> > >
> > > ComponentContext context =
> > > SCARuntime.getComponentContext("CalculatorServiceComponent");
> > > ServiceReference<CalculatorService> service =
> > > context.createSelfReference(CalculatorService.class);
> > > CalculatorService calculatorService = service.getService();
> > >
> > > Thanks,
> > > Raymond
> > >
> > > ----- Original Message -----
> > > From: "Kevin Williams" < kjwilliaster@gmail.com>
> > > To: < tuscany-dev@ws.apache.org>
> > > Sent: Friday, April 20, 2007 2:03 PM
> > > Subject: cross-composite locate service
> > >
> > >
> > > >I am interested in a way to dynamically find and invoke a service
> > > within
> > > >the
> > > > Domain without having access to a pre-defined reference.  This is
> > > not
> > > > called
> > > > out in the 1.0 specification but it would be a very useful
> > > capability.  It
> > > > also seems that many of the pieces required to implement this may
> > > soon be
> > > > in
> > > > place; especially with the work around runtime simplification and
> > > Domain
> > > > proposed by Raymond in this thread:
> > > >
> > > > http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg16792.html
> > >
> > > >
> > > > This also seems related to Scott's recent query regarding default
> > > bindings
> > > > across top level composites:
> > > >
> > > > * http://tinyurl.com/2xslxp*
> > > >
> > > > Any thoughts on this?  I would appreciate any pointers.
> > > >
> > > > Thanks!
> > > >
> > > > --Kevin
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> >
>