Return-Path: Delivered-To: apmail-tuscany-commits-archive@www.apache.org Received: (qmail 30292 invoked from network); 14 Apr 2011 10:57:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2011 10:57:56 -0000 Received: (qmail 55648 invoked by uid 500); 14 Apr 2011 10:57:56 -0000 Delivered-To: apmail-tuscany-commits-archive@tuscany.apache.org Received: (qmail 55621 invoked by uid 500); 14 Apr 2011 10:57:56 -0000 Mailing-List: contact commits-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list commits@tuscany.apache.org Received: (qmail 55614 invoked by uid 99); 14 Apr 2011 10:57:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2011 10:57:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2011 10:57:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CAE2A23888FE; Thu, 14 Apr 2011 10:57:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1092120 - in /tuscany/sca-java-2.x/trunk/samples/running-tuscany: command-line/README.html command-line/README.odt eclipse/README.html eclipse/README.odt jse/README.html jse/README.odt running-tuscany.html running-tuscany.odt Date: Thu, 14 Apr 2011 10:57:31 -0000 To: commits@tuscany.apache.org From: slaws@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110414105731.CAE2A23888FE@eris.apache.org> Author: slaws Date: Thu Apr 14 10:57:31 2011 New Revision: 1092120 URL: http://svn.apache.org/viewvc?rev=1092120&view=rev Log: Tidy up READMEs a bit. Add an icon at the top level to see if it gets generated correctly. The next natural thing to do would be to add a doc template. Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.html tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.odt tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.html tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.odt tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.odt tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.html tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.odt Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.html URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.html?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== --- tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.html (original) +++ tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.html Thu Apr 14 10:57:31 2011 @@ -1,7 +1,7 @@ -- no title specified

Running contributions using the Tuscany Shell

 

To execute a sample contribution from the command line without needing to write any runtime launcher code you can use the Tuscany shell. The Shell provides a simple tool for loading and running SCA contributions.

 

The shell can be started using the tuscany.bat (windows) or tuscany.sh (linux) scripts provided in the /bin directory of the binary distribution. You can provide the name of a contribution as an argument in the following way

 

  bin/tuscany.bat location_of_contribution

 

< p class="Standard">The getting-started\helloworld contribution is a good contribution to start with if you want to give this a go. First change directory to the root of the Tuscany binary distribution. Then;

 

on Windows:

 

  bin\tuscany.bat samples\getting-started\helloworld

 

on Linux:

 

  bin/tuscany.sh samples/getting-started/helloworld

 

Once the Shell has started with one of those methods you can use Shell commands to explore

the SCA domain, for example, use the "installed" command to get the status of installed contributions, "services" to see the available component services, and you may test calling the helloworld service by using the "invoke" comman d:

 

   invoke HelloworldComponent sayHello yourName

 

TODO – add more instructions on how to use the shell

\ No newline at end of file +

Running contributions using the Tuscany Shell

 

To execute a sample contribution from the command line without needing to write any runtime launcher code you can use the Tuscany shell. The Shell provides a simple tool for loading and running SCA contributions.

 

The shell can be started using the tuscany.bat (windows) or tuscany.sh (linux) scripts provided in the /bin directory of the binary distribution. You can provide the name of a contribution as an argument in the following way

 

  bin/tuscany.bat location_of_contribution

 

The getting-started\helloworld contribution is a good contribution to start with if you want to give this a go. First change directory to the root of the Tuscany binary distribution. Then;

 

on Windows:

 

  bin\tuscany.bat samples\getting-started\helloworld

 

on Linux:

 

  bin/tuscany.sh samples/getting-started/helloworld

 

Once the Shell has started with one of those methods you can use Shell commands to explore

the SCA domain, for example, use the "installed" command to get the status of installed contributions, "services" to see the available component services, and you may test calling the helloworld service by using the "invoke" command:

 

   invoke HelloworldComponent sayHello yourName

 

TODO – add more instructions on how to use the shell

\ No newline at end of file Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.odt URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/command-line/README.odt?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== Binary files - no diff available. Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.html URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.html?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== --- tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.html (original) +++ tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.html Thu Apr 14 10:57:31 2011 @@ -1,7 +1,7 @@ -- no title specified

Running contributions inside Eclipse

 

To import sample contributions into Eclipse you first need to import the Tuscany runtime. You then need to import the sample contribution into Eclipse as a project. Instructions for doing both of these things can be found here

 

http://tuscany.apache.org/import-existing-tuscany-sca-projects-into-eclipse.html

 

Note. these instructions refer to our 1.x code base but it holds true for our 2.x code base.

 

TODO – fix this

 

Once you have a contribution imported into Eclipse and cleanly compiling against the Tuscany runtime jars you probably want to be able to run and  debug it. The easiest way to do this is with a simple Java launcher. If you import the running-tuscany/embedded-jse project into Eclipse you'll see a simple launcher program which you can copy and adjust to launch the contribution(s) of your choice.

\ No newline at end of file +

Running contributions inside Eclipse

 

To import sample contributions into Eclipse you first need to import the Tuscany runtime. You then need to import the sample contribution into Eclipse as a project. Instructions for doing both of these things can be found here

 

http://tuscany.apache.org/import-existing-tuscany-sca-projects-into-eclipse.html

 

Note. these instructions refer to our 1.x code base but it holds true for our 2.x code base.

 

Once you have a contribution import ed into Eclipse and cleanly compiling against the Tuscany runtime jars you probably want to be able to run and  debug it. The easiest way to do this is with a simple Java launcher. If you import the running-tuscany/embedded-jse project into Eclipse you'll see a simple launcher program which you can copy and adjust to launch the contribution(s) of your choice.

\ No newline at end of file Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.odt URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/eclipse/README.odt?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== Binary files - no diff available. Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== --- tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html (original) +++ tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.html Thu Apr 14 10:57:31 2011 @@ -1,7 +1,7 @@ -- 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 +

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 Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.odt URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/jse/README.odt?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== Binary files - no diff available. Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.html URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.html?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== --- tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.html (original) +++ tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.html Thu Apr 14 10:57:31 2011 @@ -1,7 +1,7 @@ -- no title specified

Starting the  Tuscany SCA Runtime

 

How you run the Tuscany runtime, load contributions and start composites depends on what environment you're running in and what you're trying to achieve. For example, if you just want to try out some samples then you may want to run the Tuscany runtime from the command line using the Tuscany shell or from Maven or Ant. If on the other hand you want Tuscany to run in a WebApp, in OSGi or you want to debug the runtime in an IDE like Eclipse different approaches are required.

 

TODO more overview information

 

The samples in this directory show various ways in which you can start Tuscany.

 

Command line - ./command-line/command-line.html

 

 

TuscanyRuntime + Node

dependencies  base , x-*-runtime

 

webapp

standalone

shell

junit

distributed domain

\ No newline at end of file +

 

Starting the  Tuscany SCA Runtime

 

How you run the Tuscany runtime, load contributions and start composites depends on what environment you're running in and what you're trying to achieve. For example, if you just want to try out some samples then you may want to run the Tuscany runtime from the command line using the Tuscany shell or from Maven or Ant. If on the other hand you want Tuscany to run in a WebApp, in OSGi or you want to debug the runtime in an IDE like Eclipse different approaches are required.

 

The samples in this directory show various ways in which you can start Tuscany.

 

 

 

command-line

Deploy a contribution from the command line using the Tuscany Shell without writing any code

eclipse

Deploy and debug a contribution project from the Eclipse IDE

jse

Deploy a contribution from a simple Java program

junit

Deploy a contribution from a JUnit test case

 

 

\ No newline at end of file Modified: tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.odt URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/running-tuscany/running-tuscany.odt?rev=1092120&r1=1092119&r2=1092120&view=diff ============================================================================== Binary files - no diff available.