You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Ramkumar R <ra...@gmail.com> on 2008/08/27 17:41:52 UTC

Accessing the Component Implementation Instance from Runtime

Hi All,
Just came across this unique requirement from one of the SCA + Spring user.
Before we get to the problem statement, like to show how spring and sca
works together..

A Spring Application Context is used as an implementation within an SCA
composite component. A component that uses Spring for an implementation can
wire SCA
services and references without introducing SCA metadata into the Spring
configuration. The Spring context knows very little about the SCA
environment.

<composite>
     <component name="SpringComponent">
           <implementation.spring location="Application-context.xml"/>
           <service name="X"/>
           <reference name="Y" target="Z"/>
     </component>
</composite>

Now lets say this composite is deployed in the SCA Domain.

After the components are deployed, Is it possible to access the runtime
instance of the spring application context programatically?

In my opinion accessing the application context from the runtime (as you
user have requested) after its been deployed in the SCA domain looks like a
backdoor entry to the component deployed as services.

Not sure if the SCA specs supports this, so just wanted to confirm?

-- 
Thanks & Regards,
Ramkumar Ramalingam