diff options
Diffstat (limited to 'site/trunk/site-publish/documentation-2x/running-tuscany-sca-2x-with-equinox-and-felix.html')
-rw-r--r-- | site/trunk/site-publish/documentation-2x/running-tuscany-sca-2x-with-equinox-and-felix.html | 225 |
1 files changed, 225 insertions, 0 deletions
diff --git a/site/trunk/site-publish/documentation-2x/running-tuscany-sca-2x-with-equinox-and-felix.html b/site/trunk/site-publish/documentation-2x/running-tuscany-sca-2x-with-equinox-and-felix.html new file mode 100644 index 0000000000..d53263ed4b --- /dev/null +++ b/site/trunk/site-publish/documentation-2x/running-tuscany-sca-2x-with-equinox-and-felix.html @@ -0,0 +1,225 @@ + + + + + + +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<HTML> + <HEAD> + <META name="description" content="Apache Tuscany"> + <META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture, sca, service component architecture, das, sdo, csa, ruby, opensource"> + + <LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css"> + <LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/$images/favicon.ico"> + <TITLE>Running Tuscany SCA 2.x with Equinox and Felix : Apache Tuscany</TITLE> + <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD> + + <STYLE> + .spacetree * ul { + padding-left:0px; + margin-left: 0px; + } + .spacetree * li { + margin-left: 5px; + padding-left:5px; + } + </STYLE> + + <BODY onload="init()"> + <!-- topNav --> + <TABLE border="0" cellpadding="2" cellspacing="0" width="100%"> + <TR class="topBar"> + <TD align="left" valign="middle" class="topBarDiv" align="left" nowrap=""> + <A href="https://cwiki.apache.org/geronimo"> Home</A> > <A href="index.html" title="Apache Tuscany Docs 2.x">Apache Tuscany Docs 2.x</A> > <A href="index.html" title="Index">Index</A> > <A href="development-guides.html" title="Development Guides">Development Guides</A> > <A href="" title="Running Tuscany SCA 2.x with Equinox and Felix">Running Tuscany SCA 2.x with Equinox and Felix</A> + </TD> + <TD align="right" valign="middle" nowrap=""> + <FORM name="search" action="http://www.google.com/search" method="get"> + <INPUT type="hidden" name="ie" value="UTF-8"> + <INPUT type="hidden" name="oe" value="UTF-8"> + <INPUT type="hidden" name="domains" value=""> + <INPUT type="hidden" name="sitesearch" value=""> + <INPUT type="text" name="q" maxlength="255" value=""> + <INPUT type="submit" name="btnG" value="Google Search"> + </FORM> + </TD> + </TR> + </TABLE> + + + <TABLE border="0" cellpadding="2" cellspacing="0" width="100%"> + <TR class="topBar"> + <TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%"> + <A href="index.html" title="Apache Tuscany Docs 2.x">Apache Tuscany Docs 2.x</A> > <A href="index.html" title="Index">Index</A> > <A href="development-guides.html" title="Development Guides">Development Guides</A> > <A href="" title="Running Tuscany SCA 2.x with Equinox and Felix">Running Tuscany SCA 2.x with Equinox and Felix</A> + </TD> + + <TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true"> + <A href="http://tuscany.apache.org/">Tuscany Home</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A> + </TD> + </TR> + </TABLE> + + <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF"> + <TR> + <TD valign="top" align="left" width="22%" bgcolor="#F9F9F9" class="noprint"> + <DIV class="tabletitle">Table of Contents</DIV> + <DIV class="spacetree"> + + + </DIV> + </TD> + <TD align="left" valign="top" width="78%"> + <!-- pageContent --> + <DIV id="PageContent"> + <DIV class="pageheader" style="padding: 6px 0px 0px 0px;"> + <!-- We'll enable this once we figure out how to access (and save) the logo resource --> + <!--img src="http://geronimo.apache.org/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"--> + <DIV style="margin: 0px 10px 0px 10px" class="smalltext">Apache Tuscany Docs 2.x</DIV> + <DIV style="margin: 0px 10px 8px 10px" class="pagetitle">Running Tuscany SCA 2.x with Equinox and Felix</DIV> + + <DIV class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;"> +<!-- --> + <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=5603962"> + <IMG src="http://geronimo.apache.org/images/icons/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A> + <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=5603962">Edit Page</A> + + <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x"> + <IMG src="http://geronimo.apache.org/images/icons/browse_space.gif" height="16" width="16" border="0" align="absmiddle" title="Browse Space"></A> + <A href="https://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x">Browse Space</A> + + <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5603962"> + <IMG src="http://geronimo.apache.org/images/icons/add_page_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add Page"></A> + <A href="https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5603962">Add Page</A> + + <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5603962"> + <IMG src="http://geronimo.apache.org/images/icons/add_blogentry_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add News"></A> + <A href="https://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5603962">Add News</A> +<!-- --> + </DIV> + </DIV> + + <DIV class="pagecontent"> + <DIV class="wiki-content"> + <H2><A name="RunningTuscanySCA2.xwithEquinoxandFelix-1.RunningTuscanywithEquinox"></A>1. Running Tuscany with Equinox</H2> + +<P>The Tuscany distribution is ready to be started as an Equinox runtime.</P> + +<P>You can simply go into the "modules" directory in the distribution and type the following command:</P> + +<DIV class="panel" style="border-width: 1px;"><DIV class="panelContent"> +<P>java -jar osgi-3.5.0-v20090520.jar -clean -console -configuration ..\features\configuration</P> +</DIV></DIV> + +<H2><A name="RunningTuscanySCA2.xwithEquinoxandFelix-2.RunningTuscanywithFelix"></A>2. Running Tuscany with Felix</H2> + +<H3><A name="RunningTuscanySCA2.xwithEquinoxandFelix-DownloadApacheFelixdistribution"></A>Download Apache Felix distribution</H3> +<P>You can download the latest version of Felix distribution from <A href="http://felix.apache.org/site/downloads.cgi" class="external-link" rel="nofollow">http://felix.apache.org/site/downloads.cgi</A>. Unzip it into a directoy such as felix-2.0.1.</P> + +<P>The following bundles can be found in felix-2.0.1\bundle directory:</P> + +<UL> + <LI>org.apache.felix.bundlerepository-1.4.2.jar</LI> + <LI>org.apache.felix.shell-1.4.1.jar</LI> + <LI>org.apache.felix.shell.tui-1.4.1.jar</LI> +</UL> + + +<P>Please download additional bundles into felix-2.0.1\bundle directory:</P> +<UL> + <LI><A href="http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.fileinstall/2.0.0/org.apache.felix.fileinstall-2.0.0.jar" class="external-link" rel="nofollow">org.apache.felix.fileinstall-2.0.0.jar</A></LI> + <LI><A href="http://repo1.maven.org/maven2/org/apache/felix/org.osgi.compendium/1.4.0/org.osgi.compendium-1.4.0.jar" class="external-link" rel="nofollow">org.osgi.compendium-1.4.0.jar</A></LI> + <LI><A href="http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-1.2.4.jar" class="external-link" rel="nofollow">org.apache.felix.configadmin-1.2.4.jar</A></LI> +</UL> + + +<P>To run the web console, you need more bundles:</P> +<UL> + <LI>org.apache.felix.http.api-2.0.2.jar</LI> + <LI>org.apache.felix.http.base-2.0.2.jar</LI> + <LI>org.apache.felix.http.bundle-2.0.2.jar</LI> + <LI>org.apache.felix.http.jetty-2.0.2.jar</LI> + <LI>org.apache.felix.metatype-1.0.4.jar</LI> + <LI>org.apache.felix.prefs-1.0.4.jar</LI> + <LI>org.apache.felix.scr-1.0.8.jar</LI> + <LI>org.apache.felix.eventadmin-1.0.0.jar</LI> + <LI>org.apache.felix.webconsole-2.0.0.jar</LI> +</UL> + + +<H3><A name="RunningTuscanySCA2.xwithEquinoxandFelix-AddTuscanybundles"></A>Add Tuscany bundles</H3> +<P>Copy all bundles (jars and folders) under the modules directory of Tuscany distribution to felix-2.0.1\load.<BR> +Remove the following Equinox jars from felix-2.0.1\load:</P> + +<UL> + <LI>osgi-3.5.0-v20090520.jar</LI> + <LI>services-3.2.0-v20090520-1800.jar</LI> + <LI>common-3.5.0-v20090520-1800.jar</LI> +</UL> + + +<P>Alternatively, Tuscany also provides aggregate jars which simplify the use of Tuscany by minimizing the number of jars required. For this exercise the single base jar includes everything necessary so that single jar can be used in the Felix bundle directory. The releases of this jar can be found in the Maven repository <A href="http://repo2.maven.org/maven2/org/apache/tuscany/sca/shades/tuscany-base-nodep/" class="external-link" rel="nofollow">here</A> or the latest development snaphosts <A href="https://repository.apache.org/content/groups/snapshots/org/apache/tuscany/sca/shades/tuscany-base-nodep/2.0-SNAPSHOT/" class="external-link" rel="nofollow">here</A>.</P> + +<H3><A name="RunningTuscanySCA2.xwithEquinoxandFelix-Startfelix"></A>Start felix</H3> +<DIV class="panel" style="border-width: 1px;"><DIV class="panelContent"> +<P>java -jar bin\felix.jar</P> +</DIV></DIV> + + +<H3><A name="RunningTuscanySCA2.xwithEquinoxandFelix-InstallOSGiremoteservicesamplebundles"></A>Install OSGi remote service sample bundles</H3> +<P><SPAN class="image-wrap" style=""><IMG src="http://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/samples/dosgi-dynamic-calculator/dosgi-calculator.png" style="border: 0px solid black"></SPAN></P> +<DIV class="panel" style="border-width: 1px;"><DIV class="panelContent"> +<P>-> install <A href="file:///C:/Tuscany-2.x/java/sca/samples/dosgi-dynamic-calculator/target/sample-dosgi-dynamic-calculator.jar" class="external-link" rel="nofollow">file:///C:/Tuscany-2.x/java/sca/samples/dosgi-dynamic-calculator/target/sample-dosgi-dynamic-calculator.jar</A><BR> +Bundle ID: 205<BR> +-> start 205<BR> +-> install <A href="file:///C:Tuscany-2.x/java/sca/samples/dosgi-dynamic-calculator-operations/target/sample-dosgi-dynamic-calculator-operations.jar" class="external-link" rel="nofollow">file:///C:\Tuscany-2.x/java/sca/samples/dosgi-dynamic-calculator-operations/target/sample-dosgi-dynamic-calculator-operations.jar</A><BR> +Bundle ID: 206<BR> +-> start 206</P> +</DIV></DIV> + +<P>Now, the distributed OSGi calculator is available as a Web service at <A href="http://rfengt61p:8086/CalculatorService" class="external-link" rel="nofollow">http://rfengt61p:8086/CalculatorService</A>. You can see the WSDL in a browser with URL: <A href="http://rfengt61p:8086/CalculatorService?wsdl" class="external-link" rel="nofollow">http://rfengt61p:8086/CalculatorService?wsdl</A>. </P> + +<P>You can now use a web service client such as Eclipse Web Service explorer to invoke the calculator.</P> + +<DIV class="panelMacro"><TABLE class="noteMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B>A JAX-WS client</B><BR>You can download a <A href="running-tuscany-sca-2x-with-equinox-and-felix.data/sample-calculator-jaxws-client.jar">JAX-WS client for the calculator sample</A> and run:<BR> +java -jar sample-calculator-jaxws-client.jar <EM>expression</EM><BR> +The expression can be like 1.0+2.0, 2.0/1.0, 3.5-2.0, or 1.0x2.0</TD></TR></TABLE></DIV> + +<P>For more information on Tuscany's implementation of OSGi remote services, see: <A href="development-guides.data/OSGi%20Remote%20Services%20with%20Tuscany%20SCA.ppt">OSGi Remote Services with Tuscany SCA.ppt</A></P> + </DIV> + + </DIV> + </DIV> + </TD> + </TR> + </TABLE> + + <!-- footer --> + <TABLE border="0" cellpadding="2" cellspacing="0" width="100%"> + <TR> + <TD align="left" valign="middle" class="footer"> + + <IMG src="http://static.delicious.com/img/delicious.small.gif" height="10" width="10" alt="Delicious"> + <A href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=550,height=550'); return false;">Bookmark this on Delicious</A> + + <IMG src="http://digg.com/img/badges/16x16-digg-guy.gif" width="16" height="16" alt="Digg!"> + <A href="" onclick="window.open('http://digg.com/submit?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&topic=programming');">Digg this</A> + <!-- Slicker, but no text + <script type="text/javascript"> + digg_skin = 'icon'; + digg_window = 'new'; + digg_title = 'Apache Geronimo v2.2 Documentation : Running Tuscany SCA 2.x with Equinox and Felix'; + digg_topic = 'programming'; + </script> + <script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script> + --> + + </TD> + <TD align="right" valign="middle" class="footer"> + <A href="http://cwiki.apache.org/GMOxPMGT/geronimo-privacy-policy.html">Privacy Policy</A> - + Copyright © 2003-2010, The Apache Software Foundation, Licensed under <A href="http://www.apache.org/licenses/LICENSE-2.0">ASL 2.0.</A> + </TD> + </TR> + </TABLE> + + </BODY> +</HTML>
\ No newline at end of file |