From 4e1c2f550c9427a495d72b036022a4a04a9c7c8f Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 18 Apr 2011 08:39:13 +0000 Subject: Add license header to fix legal itest. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1094357 13f79535-47bb-0310-9956-ffa450edef68 --- .../trunk/samples/running-tuscany/jse/README.html | 62 ++++++++++++++-------- 1 file changed, 40 insertions(+), 22 deletions(-) (limited to 'sca-java-2.x/trunk/samples/running-tuscany/jse/README.html') diff --git a/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html b/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html index ee538a7552..fc36b9b643 100644 --- a/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html +++ b/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html @@ -1,23 +1,41 @@ - - -- no title specified

Running the Tuscany runtime from a Java program

 

The Tuscany SCA Runtime provides a Node API that allows the runtime to be started from within a Java program. A Node in Tuscany represents a set of activated composites and a Node is configured  with all of the contributions required for those composites to run. The idea is to allow you to partition the domain up into it's constituent deployable composites and run each one in its own node on an appropriate machine. In that way the domain can easily be distributed while SCA takes care of making sure that wired services can communicate regardless of where they are.

 

The basic pattern is as follows:

 

1/ Use the org.apache.tuscany.sca.node.NodeFactory API to create a org.apache.tuscany.sca.node.Node instance configured with enough contributions to run the required composite

2/ Start the Node instance. This starts deployable composites contained in the provided contributions

3/ Interact with the services that the Node instance has made available

4/ Stop the Node instance

 

The pattern is demonstrated in this sample in the launcher.LaunchCalculatorContribution class. It loads the calculator-contribution.jar contribution found in the parent directory, makes a simple call to add two numbers together using the Calculator service and then shuts down.

 

To run the sample on Windows do:

 

cd jse

run-sample.bat

 

To run the sample on *nix do:

 

cd jse

run-sample.sh

 

To re-build the sample classes do

 

cd jse

mvn

 

Note. The mvn build will automatically run a unit test that also runs the sample.

 

\ No newline at end of file -- cgit v1.2.3