OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

sca-j message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: NEW ISSUE: Accessing SCA Services from non-SCA component code


TARGET: Java Common Annotations and APIs specification,

        Section titled "ComponentContext” (currently



Code that is completely external to an SCA domain can communicate to SCA services through the externally advertised service bindings.


However, there is sometimes code that is deployed that shares much in common with the SCA domain.  In increasing levels of coupling, the code might:

1.    Have SCA APIs on the classpath, implemented to work with the target domain

2.    The client code is running on one of the JVM runtimes that is associated with the target domain.

3.    The client code was deployed as part of an SCA deployment, but the code is not within an SCA component.


In some or all of these cases, we should provide a simple way for the client to access the target component.


The current specification implies that the client would accomplish this by accessing some ComponentContext that has references injected on it, although it does not describe what component to use for this purpose (after all, the client is not associated with a component).  Here is the current text of that section:


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!");






Nothing yet.




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]