Space: Apache Tuscany Docs 2.x
(http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x)
Page: Running Tuscany SCA 2.x with Equinox and Felix
(http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/Running+Tuscany+SCA+2.x+with+Equinox+and+Felix)
Edited by Raymond Feng:
---------------------------------------------------------------------
h2. 1. Running Tuscany with Equinox
The Tuscany distribution is ready to be started as an Equinox runtime.
You can simply go into the "modules" directory in the distribution and type the
following command:
{panel}
java \-jar osgi-3.5.0-v20090520.jar \-clean \-console \-configuration
..\features\configuration
{panel}
h2. 2. Running Tuscany with Felix
h3. Download Apache Felix distribution
You can download the latest version of Felix distribution from
[http://felix.apache.org/site/downloads.cgi]. Unzip it into a directoy such as
felix-2.0.1.
The following bundles can be found in felix-2.0.1\bundle directory:
* org.apache.felix.bundlerepository-1.4.2.jar
* org.apache.felix.shell-1.4.1.jar
* org.apache.felix.shell.tui-1.4.1.jar
Please download additional bundles into felix-2.0.1\bundle directory:
*
[org.apache.felix.fileinstall-2.0.0.jar|http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.fileinstall/2.0.0/org.apache.felix.fileinstall-2.0.0.jar]
*
[org.osgi.compendium-1.4.0.jar|http://repo1.maven.org/maven2/org/apache/felix/org.osgi.compendium/1.4.0/org.osgi.compendium-1.4.0.jar]
*
[org.apache.felix.configadmin-1.2.4.jar|http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-1.2.4.jar]
To run the web console, you need more bundles:
* org.apache.felix.http.api-2.0.2.jar
* org.apache.felix.http.base-2.0.2.jar
* org.apache.felix.http.bundle-2.0.2.jar
* org.apache.felix.http.jetty-2.0.2.jar
* org.apache.felix.metatype-1.0.4.jar
* org.apache.felix.prefs-1.0.4.jar
* org.apache.felix.scr-1.0.8.jar
* org.apache.felix.eventadmin-1.0.0.jar
* org.apache.felix.webconsole-2.0.0.jar
h3. Add Tuscany bundles
Copy all bundles (jars and folders) under the modules directory of Tuscany
distribution to felix-2.0.1\load.
Remove the following Equinox jars from felix-2.0.1\load:
* osgi-3.5.0-v20090520.jar
* services-3.2.0-v20090520-1800.jar
* common-3.5.0-v20090520-1800.jar
h3. Start felix
{panel}
java \-jar bin\felix.jar
{panel}
h3. Install OSGi remote service sample bundles
{panel}
[http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/samples/dosgi-dynamic-calculator/dosgi-calculator.png]
-> install
file:///C:/Tuscany-2.x/java/sca/samples/dosgi-dynamic-calculator/target/sample-dosgi-dynamic-calculator.jar
Bundle ID: 205
-> start 205
-> install
file:///C:\Tuscany-2.x/java/sca/samples/dosgi-dynamic-calculator-operations/target/sample-dosgi-dynamic-calculator-operations.jar
Bundle ID: 206
-> start 206
{panel}
Now, the distributed OSGi calculator is available as a Web service at
http://rfengt61p:8086/CalculatorService. You can see the WSDL in a browser with
URL: http://rfengt61p:8086/CalculatorService?wsdl.
You can now use a web service client such as Eclipse Web Service explorer to
invoke the calculator.
Change your notification preferences:
http://cwiki.apache.org/confluence/users/viewnotifications.action