Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
borderfalse
Column
width15%
Include Page
TUSCANYWIKI: Repeating Menu
TUSCANYWIKI: Repeating Menu
Include Page
TUSCANYWIKI: Java SCA Menu New
TUSCANYWIKI: Java SCA Menu New
Column
width85%

<implementation.spring>

The Tuscany Java SCA runtime supports components implemented with Spring Framework by using the <implementation.spring> SCDL extension.

Spring Framework are used with SCA by integration Spring at the SCA Composite level, where a Spring application context provides a complete composite, exposing services and using references via SCA. This means that a Spring application context defines the internal structure of a composite implementation.

The Spring Component implementation is one of the SCA extensions which is being formalized in the OASIS Open Composite Services Architecture with a published specifications document.

How to Use Spring Component Implementation

The Spring component implementation SCDL has the following format:

Code Block
   <implementation.spring location="targetURI" />

Where the location attribute of that element specifies the target uri of an archive file or directory that contains the Spring application context files.

Tuscany allows the user to specify the location attribute with a target uri as a fully qualified path to the spring application context file as shown below.

Specifying Fully Qualified Path:

Code Block

   <implementation.spring location="./application-context.xml" />

Specifying a Directory:

Code Block

   <implementation.spring location="./spring" />

Specifying an Archive file:

Code Block

   <implementation.spring location="./spring.jar" />

some examples

This example shows a simple composite with a component that uses <implemantation.java>:

Code Block
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
    targetNamespace="http://sample"
    xmlns:sample="http://sample"
    name="SampleComposite">

    <component name="SampleComponent">
       <implementation.java class="sample.SampleImpl"/>
    </component>
    
</composite>