Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

[2.0-beta-Samples documentation|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.

In a distribution, the 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 distributionsamples directory and its subdirectories.

Table of Contents
minLevel2
outlinetrue

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.

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.

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)

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.

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 ...
..\bin\tuscany.bat "contribution-name"
for example
..\bin\tuscany.bat contribution-binding-sca-calculator
or on *nix platforms, from a shell prompt in the samples directory, run the command ...
../bin/tuscany.sh contribution-binding-sca-calculator
To execute a sample contribution from the command line on Windows, from a command prompt in the samples directory, run the command ...

Code Block

..\bin\tuscany.bat "contribution-name"

for example

Code Block

..\bin\tuscany.bat contribution-binding-sca-calculator

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

Code Block

../bin/tuscany.sh contribution-binding-sca-calculator

launcher-embedded-jse

launcher-embedded-osgi

...