Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

*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.
*All policy enforcement occurs in the SCA runtime implementation and does not enter into the Spring space.
*It should be possible to generate an SCA Composite from any Spring context and use that composite within an SCA assembly.

Anchor
Scenario1
Scenario1
1.

...

Using implementation.

...

spring as a component implementation

...

A Spring component acts within a business process accepting call from client components and send on calls to other components. The operation of the component in the Spring assembly is controlled through SCA properties. Here the component type is derived from the spring implementation with no SCA specific entries in the spring application context.

...

Code Block
    <component name="ClientComponent">
        <implementation.java class="org.apache.tuscany.sca.implementation.spring.itests.helloworld.HelloWorldProxy"/>
        <reference name="delegate" target="SpringComponent"/>
    </component>

    <component name="SpringComponent">
        <implementation.spring location="META-INF/sca/SpringComponent-context.xml"/>
        <reference name="testReference" target="ReferenceComponent"/>
        <property name="testProperty">Hello</property>
    </component>

    <component name="ReferenceComponent">
        <implementation.java class="org.apache.tuscany.sca.implementation.spring.itests.helloworld.HelloWorldImpl"/>
    </component>

Anchor
Scenario2
Scenario2
2.

...

Declaring SCA Service/Reference within Spring Application Context

A Spring component acts within a business process accepting call from client components and send on calls to other components. The operation of the component in the Spring assembly is controlled through SCA properties. Here the component type is derived from the spring implementation with no SCA specific entries in the spring application context.

...

Anchor
Scenario3
Scenario3
3. Working with different SCA bindings within Spring

We know that 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. Hence the SpringComponent implementation remains the same but different bindings are chosen at the SCA Composite level as shown below.

Working with SCA WebServices Binding

...

Code Block
<component name="AccountServiceComponent">
    <implementation.spring location="spring-context/Account-spring-context.xml"/>
    
    <reference name="calculatorService">
        <tuscany:binding.rmi host="localhost" port="8099" serviceName="CalculatorRMIService"/>
    </reference>
</component>

Working with ATOM and RSS bindings

TBD

Policy - Security

TBD

Policy - Transaction

...