Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
bordertrue
Column
width15%
Include Page
TUSCANY: SCA Java Subproject Menu
TUSCANY: SCA Java Subproject Menu
Include Page
TUSCANY: Java SCA Menu New
TUSCANY: Java SCA Menu New
Column
width85%

host.embedded

The embedded host extension provides some simple options for embedding the SCA runtime in other applications such as the test programs that the Apache Tuscany projects project uses for the tests and for its samples sample applications.

SCADomain

You will see SCADomain used in many of the projects test and samples applications in the following form:

Code Block
// intialiseintialize the Tuscany SCA Java runtime and provide a contribution
SCADomain scaDomain = SCADomain.newInstance("Calculator.composite");

// a self reference to a service in the contribution
CalculatorService calculatorService = scaDomain.getService(CalculatorService.class, "CalculatorServiceComponent");

// do some work with the service
int result = calculatorService.add(3, 2)

// shitshut down the Tuscany SCA Java runitme
scaDomain.close();
Looking a SCADomain in a little more detail there are a number of features that are provided

SCADomain provides an interface for creating a domain and adding contributions. Once the domain is initialize it can be used to find services and references from the domain so that they can be manipulated directly.

Selecting A Domain Implementation

Currently two domain inplementations are provided, DefaultSCADomain and EmbeddedSCADomain. You can choose between the two by...

(warning) TODO

DefaultSCADomain

Defining A Contribution

(warning) TODO

Domain URI

(warning) TODO

Getting Services

(warning) TODO

Getting References

(warning) TODO

EmbeddedSCADomain

Defining A Contribution

(warning) TODO

Domain URI

(warning) TODO

Getting Services

(warning) TODO

Getting References

(warning) TODO