...
Code Block |
---|
cd helloworld-contribution
mvn tuscany:run
|
Note |
---|
|
And then what? ![(warning)](/confluence/s/34gb19/8804/10mvnxf/_/images/icons/emoticons/warning.svg) |
Note |
---|
|
Wiki Markup |
---|
need description of structure and operation this application once we've decided what that should be
{node}
For more information on getting started with the Apache Tuscany SCA Java runtime see the [getting started] page.
h3. |
|
...
...
This sample is not a contribution in it's own right but demonstrates how to run the helloworld-contribution inside a web application. |
|
...
To build this contribution using Maven do the following: |
|
...
|
Code Block |
---|
}
cd helloworld-webapp
mvn
|
|
This will produce a webapp as follows:
{code}
This will produce a webapp as follows:
{code}
helloworld-webapp/target/helloworld.war
|
{code}
You can run this webapp by deploying it to you're favourite webapp container. For example, you can deploy to Tomcat and run as follows: |
|
...
|
}
cp helloworld-webapp/target/helloworld.war my_tomcat_install/webapps
my_tomcat_install/bin/catalina run |
|
...
{code}
{note:title=TODO}
This sample webapp doesn't provide any web |
|
...
pages so how to make it do something?
|
|
Code Block |
---|
HelloworldImpl.sayHello world
Hello world
|
For more information on creating webapps to run SCA contributions with Tuscany see - ![(warning)](/confluence/s/34gb19/8804/10mvnxf/_/images/icons/emoticons/warning.svg)
callback-api
Note |
---|
|
This feels like a learning-more sample. I wouldn't focus on callbacks with the first time user |
sca-scopes
Wiki Markup |
---|
need description of structure and operation this application once we've decided what that should be
{node}
{note:title=TODO}
For more information on creating webapps to run SCA contributions with Tuscany see - ?
|
|
callback-api
Note |
---|
Note |
---|
|
This feels like a learning-more sample. I wouldn't focus on scopes callbacks with the first time user |
sca-
...
scopes
Note |
---|
|
This feels like a learning-more sample. I wouldn't focus on inclusion scopes with the first time user |
running-tuscany
sca-include-contribution
Note |
---|
|
This feels like a learning-more sample. I wouldn't focus on inclusion with the first time user |
running-tuscany
Running something Running something in Tuscany requires one or more contributions, and a method of launching the contributions to make them available as servicesthe services they provide available. The sections below describes various means of launching contributions into an executing tuscany runtime.
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 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 ...
...
with the Tuscany SCA Java runtime. It's not important that you try all of these but they show you what's possible and hopefully show you how to use Tuscany in you environment.
Some of the running-tuscany sub-directories just contain a README that gives you instructions. For example, maven just tells you how to configure and run contributions using the maven-tuscany-plugin. Other code more code. For example, embedded-jse contains simple Java launchers that show you how to start some of the sample contributions from a Java program.
The sample contributions in getting-started and learning-more should work regardless of which approach you adopt. However some approachs, like embedded-jse, don't have launchers for every single sample contribution.
command-line
Instructions for how to execute a sample contribution from the command line on Windows or linux.
eclipse
Instructions for how import sample contributions into eclipse and have them compile against the Tuscany runtime Jars. If you also use the simple Java launcher style demonstrated in the embedded-jse directory you can easily launch and debug contribution. The sample launching code can be included in JUnit tests if you want to be able to automatically test your contributions.
embedded-jse
This directory contains sample java launchers for the some of the
tuscany sample contributions. To use the sample JSE launchers with ant execute the command
Code Block |
---|
ant run-<contributionname>
|
where run-<contributionname> is one of the targets in the build.xml file
...