...
This is the simplest contribution. This contribution describes a composite application with a single component implemented in Java. The component's Java implementation provides service "business logic" for saying hello to a person whose name is supplied as input to the service.
Panel | ||
---|---|---|
| ||
To build this contribution using Maven do the following: TODO |
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
To build this contribution using Maven do the following:
This will produce the contribution as follows:
You can run the contribution using Maven by doing the following:
|
Note | ||
---|---|---|
| ||
And then what? |
...
This sample is not a contribution in it's own right but demonstrates how to run the helloworld-contribution inside a web application.
Panel | ||||
---|---|---|---|---|
| ||||
To build this contribution using Maven do the following:
This will produce a webapp as follows:
|
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:
...
This directory contains sample java launchers for the some of the Tuscany sample contributions from the learning-more directory. It shows you how to embed the Tuscany runtime in a Java program. To make you're own launchers simply copy and existing one and change the details of the contribution being loaded. You'll note that the same launcher code is used inside the contribution unit test demonstrated by maven-junit.
To use the sample JSE launchers from maven do the following:
Code Block |
---|
cd embedded-jse
mvn
|
...
Panel | ||
---|---|---|
| ||
To use the sample JSE launchers with ant execute the command
where <contributionname> is one of the targets in the provided build.xml file |
Panel | ||
---|---|---|
|
embedded-osgi
To use the sample JSE launchers from Maven do the following:
This runs a JUnit test case that runs all the launchers in turn. |
embedded-osgi
The Tuscany runtime jars will The Tuscany runtime jars will also work within an OSGi enviroment. If you want to load them into a vanilla OSGi environment see the osgi directory. If you want Tuscany to create an OSGi environment for you this directory contains launchers that do just that.
Panel | ||
---|---|---|
| ||
To use the sample |
...
OSGI launchers |
...
with ant do the following:
|
...
where <contributionname> is one of the targets in the build.xml file |
Panel | ||
---|---|---|
| ||
To use the sample |
...
JSE launchers |
...
from Maven do the following:
|
...
This runs a JUnit test case that runs all the launchers in turn. |
maven
Maven can be used to install contributions. Tuscany has a special plugin (maven-tuscany-plugin) that makes this happen. Look for contributions that have the following configuration in their pom.xml file:
...
contribution-calculator-webapp
This contribution pacakges the same calculator-contribution inside a webapp.
Panel | ||
---|---|---|
| ||
The webapp can be built using Maven as follows:
|
The webapp can be installed and run as follows:
Code Block |
---|
cd learning-more/binding-jsonrpc/calcualtor-webapp
cp target/sample-binding-jsonrpc-calculator-webapp.war <your_container_deployment-dir>
start the container as appropriate
|
Once the webapp is deployed point your browser at:
Code Block | ||
---|---|---|
http://localhost:8080/sample-binding-jsonrpc-calculator-webapp/
| ||
Note | ||
| ||
Understand and Document |
binding-rmi
In this example the calculator function is split over two contributions in order to demonstrate the remote method invocation binding. The CalculatorService in the CalculatorServiceComponent defined in the CalculatorRMIServer.composite file is configured to be accessible using RMI.
...