Space: Apache Tuscany Docs 2.x 
(https://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x)
Page: Samples 
(https://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/Samples)


Edited by kelvin goodson:
---------------------------------------------------------------------
h1. {color:#003366}{*}Tuscany Samples{*}{color}

{color:#000000}The Tuscany Samples are shipped with Tuscany binary and source 
releases. If you are using tuscany from a release distribution then make sure 
you are looking at the documentation that corresponds to the samples as they 
stood at the time of the release ...{color}

{color:#003366}\[{color}{color:#003366}2.0-beta-Samples 
documentation{color}\|2.0-beta-Samples documentation\]If however you are 
working with a snapshot distribution, or using samples code from the trunk of 
our source repository, then you've come to the right place, as the 
documentation here reflects the curtrent status of the samples in the trunk of 
our source tree.

{color:#000000}In a distribution, the samples source code is found in either a 
binary or source code distribution in the samples directory, directly under the 
root directory. The following sections are laid out to match the structure of 
the samples directory and its subdirectories.{color}\\

{toc:outline=true|minLevel=2}

h2. getting-started

The basic package of SCA application artifacts is a contribution which for this 
simple sample is found in contribution-helloworld.  There's also 
a  directory which contains all you need to make a web application 
archive which can be deployed to a web container such as Tomcat, so that the 
sayHello service can be run in the web container.

h3. contribution-helloworld

This contribution contains Java implementation code offering the service String 
sayHello(String name), where the immplementation of the service

In this folder you'll find the simplest contribution, implemented in Java, that 
implements the "business logic" of saying hello to a person whose name is 
supplied as input to the service.


h3. helloworld-webapp

(TODO It's not at all clear how this is supposed to work once it is in the web 
container - I have asked on the dev list)




h2. running-tuscany

Running something in Tuscany requires one or more contributions, and a method 
of launching the contributions to make them available as services. In the 
sections below is described various means of launching contributions into an 
executing  tuscany runtime.


h3. launcher-command-line

To execute a sample contribution from the command line on Windows, from a 
command prompt in the samples directory, run the command ...

{code}
..\bin\tuscany.bat "contribution-name"
{code}

for example

{code}
..\bin\tuscany.bat contribution-binding-sca-calculator
{code}

or on \*nix platforms, from a shell prompt in the samples directory, run the 
command ...

{code}
../bin/tuscany.sh contribution-binding-sca-calculator
{code}

h3. launcher-embedded-jse

This directory contains sample java launchers for the
tuscany sample contributions. To use the sample JSE launchers with ant execute 
the command
{code}
ant run-<contributionname>
{code}

where run-<contributionname> is one of the targets in the build.xml file

To use this sample launcher to run all of the contributions as junit test 
cases, execute the command "mvn" in the launcher directory.


h3. launcher-embedded-osgi

The launchers implemented in the src/main/java/launchers directory each launch 
a specific contribution into the OSGI runtime.
To use this sample OSGI launcher with ant excute the command

{code}
ant run-<contributionname>
{code}
where run-<contributionname> is one of the targets in the build.xml file

To use this sample launcher to run all of the contributions as junit test cases,
execute the command {code}mvn{code} in the launcher directory.


h3. launcher-maven
To execute a sample contribution from Maven

look for contributions that have the following configuration in their pom.xml 
file:

<plugin>
    <groupId>org.apache.tuscany.maven.plugins</groupId>
    <artifactId>maven-tuscany-plugin</artifactId>
    <version>2.0-SNAPSHOT</version>
</plugin>

For contributions that have this, for example, 
learning-more/binding-sca/contribution-calculator, do the following

cd samples/learning-more/binding-sca/contribution-calculator
mvn tuscany:run

This will launch the contribution in the Tuscany runtime and then wait. At this 
point you can use
other clients to send messages to services that the running SCA applcation 
exposes, 
for example, try learning-more/calculator-scaclient.

h3. launcher-osgi


h3. launcher-shell


h3. launcher-webapp


h2. learning-more

h3. contributions

h4. helloworld-bpel


h4. helloworld-recursive


h4. helloworld-recursive-ws


h4. helloworld-scaclient


h4. helloworld-spring


h4. helloworld-ws-sdo


h3. webapps


h4. helloworld-bpel


h4. helloworld-jaxrs


h4. helloworld-jms


h4. helloworld-js-client


h4. helloworld-jsf


h4. helloworld-jsp


h4. helloworld-servlet


h4. helloworld-spring


h4. helloworld-stripes

==


h3. async


h4. embedded-jse-async-sample-launcher


h4. sample-contribution-implementation-java-calculator-async


h3. binding-comet


h3. binding-jsonrpc


h4. contribution-calculator


h4. contribution-calculator-webapp


h3. binding-rmi


h4. contribution-calculator-reference


h4. contribution-calculator-service


h3. binding-sca


h4. contribution-calculator


h3. binding-ws


h4. contribution-calculator


h3. distributed-osgi


h4. dynamic


h5. dosgi-dynamic-calculator


h5. dosgi-dynamic-calculator-operations


h4. implementation.osgi


h5. dosgi-calculator


h5. dosgi-calculator-operations


h3. implementation-extension


h3. implementation-java


h4. contribution-calculator


h3. implementation-script


h4. contribution-calculator


h3. logging-scribe


h3. maven-osgi-junit


h4. calculator-osgi


h4. calculator-rest-osgi


h3. sca-client


h4. calculator-scaclient


h2. applications


h3. store


h3. store-webapp

Change your notification preferences: 
https://cwiki.apache.org/confluence/users/viewnotifications.action    

Reply via email to