You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Antonio Mirarchi <an...@gmail.com> on 2009/07/18 06:21:02 UTC

Accessing SCA Services from non-SCA component code

Hi, i'm working with java and tuscany 1.4 and tuscany 1.5 i have a question
about accessing SCA services from non-sca client: in the Java common
annotations and Apis specification is specified:

"
Non-SCA client code can use the ComponentContext API to perform operations
against a component in an SCA domain. How client code obtains a reference to
a ComponentContext is runtime specific. The following example demonstrates
the use of the component Context API by non-SCA code:

ComponentContext context = // obtained through host environment-specific
means
HelloService helloService =
context.getService(HelloService.class,"HelloService");
String result = helloService.hello("Hello World!");
"

but i don't know how obtained the "context". Is there an api that i've not
seen or an example how to do it? thanks a lot.