summaryrefslogtreecommitdiffstats
path: root/site/trunk/site-publish/federation-notes.html
diff options
context:
space:
mode:
Diffstat (limited to 'site/trunk/site-publish/federation-notes.html')
-rw-r--r--site/trunk/site-publish/federation-notes.html267
1 files changed, 267 insertions, 0 deletions
diff --git a/site/trunk/site-publish/federation-notes.html b/site/trunk/site-publish/federation-notes.html
new file mode 100644
index 0000000000..2facc1f947
--- /dev/null
+++ b/site/trunk/site-publish/federation-notes.html
@@ -0,0 +1,267 @@
+
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE- 2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+ <HEAD>
+ <!-- generateKeywords macro -->
+ <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">
+ <!-- generateKeywords macro end -->
+
+ <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/TUSCANY/$images/favicon.ico">
+ <TITLE>Apache Tuscany : Federation Notes</TITLE>
+ <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+
+ <BODY onload="init()">
+ <!-- topNav macro -->
+ <TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg">
+ <TR>
+ <TD valing="top" align="left">
+ <A href="https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg" height="91" width="25" border="0"></A>
+ </TD>
+ <TD>
+ <A href="http://tuscany.apache.org/"><IMG src="http://tuscany.apache.org/images/TuscanyLogo.jpg" border="0"></A>
+ </TD>
+
+ <TD width="100%">
+ &nbsp;
+ </TD>
+
+ <!-- Adds the edit page link to the top banner-->
+ <TD valign="bottom">
+ <DIV style="padding: 2px 10px; margin: 0px;">
+ <A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=49982">
+ <IMG src="http://tuscany.apache.org/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
+ </DIV>
+ </TD>
+
+ </TR>
+ </TABLE>
+ <!-- topNav macro end -->
+
+ <!-- breadCrumbs macro -->
+ <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
+ <TR class="topBar">
+ <TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%">
+ &nbsp;<A href="home.html" title="Apache Tuscany">Apache Tuscany</A>&nbsp;&gt;&nbsp;<A href="home.html" title="Home">Home</A>&nbsp;&gt;&nbsp;<A href="sca-overview.html" title="SCA Overview">SCA Overview</A>&nbsp;&gt;&nbsp;<A href="sca-java.html" title="SCA Java">SCA Java</A>&nbsp;&gt;&nbsp;<A href="sca-java-work-in-progress.html" title="SCA Java Work-In-Progress">SCA Java Work-In-Progress</A>&nbsp;&gt;&nbsp;<A href="" title="Federation Notes">Federation Notes</A>
+ </TD>
+
+ <TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true">
+ <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>&nbsp;&nbsp;
+ </TD>
+ </TR>
+ </TABLE>
+ <!-- breadCrumbs macro end -->
+
+
+ <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF">
+ <TR>
+ <TD align="left" valign="top">
+
+ <!-- pageContent macro -->
+ <DIV id="PageContent">
+
+ <DIV class="pagecontent">
+ <DIV class="wiki-content">
+ <P>Pulling together notes on what has been build to support federation in the tunk as it stands (just after TSS demo - March 07)</P>
+
+<H2><A name="FederationNotes-References"></A>References</H2>
+
+<P>Raymond's architecture guide <A href="http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany%20Architecture%20Guide" class="external-link" rel="nofollow">http://cwiki.apache.org/confluence/display/TUSCANY/Tuscany+Architecture+Guide</A><BR>
+Some discussions from the dev list about contributio, discovery, federation and the TSS demo:</P>
+<UL>
+ <LI>First talk of contribution and assembly service <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CE38CFB43-CEB5-456F-BDDD-C25BFFC3C238@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cE38CFB43-CEB5-456F-BDDD-C25BFFC3C238@apache.org%3e</A></LI>
+ <LI>Mangament service intro <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CBAY105-F38054BAB691DCF4F15BA77DDB80@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cBAY105-F38054BAB691DCF4F15BA77DDB80@phx.gbl%3e</A></LI>
+ <LI>First talk of distributed/federated assemblies <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3C90B6915C-ED14-484A-873F-F26894C63DB2@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3c90B6915C-ED14-484A-873F-F26894C63DB2@apache.org%3e</A></LI>
+ <LI>Resolve and verify phases of deployment <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3C2F2C595B-CCDA-4AB0-8BF9-A20CB4012F88@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3c2F2C595B-CCDA-4AB0-8BF9-A20CB4012F88@apache.org%3e</A></LI>
+ <LI>JMX and standalone runtime <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3C53EC6802E2BF4643BBD5BC34D2C3A38301B6C3F2@SPR3V4.office.local%3E/" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3c53EC6802E2BF4643BBD5BC34D2C3A38301B6C3F2@SPR3V4.office.local%3e/</A><BR>
+<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3CBAY105-F20D5A6A881D4A9A3ED3D45DDBD0@phx.gbl%3E/" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/raw/%3cBAY105-F20D5A6A881D4A9A3ED3D45DDBD0@phx.gbl%3e/</A></LI>
+ <LI>Federated deployment<BR>
+<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CE6925252-9922-4A65-8867-2B0E2B2BFA67@apache.org%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cE6925252-9922-4A65-8867-2B0E2B2BFA67@apache.org%3e</A><BR>
+<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3CBAY105-F33CE29B9024EDBB20FCA09DDA70@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200701.mbox/%3cBAY105-F33CE29B9024EDBB20FCA09DDA70@phx.gbl%3e</A><BR>
+<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200702.mbox/%3C53EC6802E2BF4643BBD5BC34D2C3A38301E41C94@SPR3V4.office.local%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200702.mbox/%3c53EC6802E2BF4643BBD5BC34D2C3A38301E41C94@SPR3V4.office.local%3e</A></LI>
+ <LI>Federation demo startup<BR>
+<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3CBAY105-F14D60CFBA31DA296B772EADD770@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3cBAY105-F14D60CFBA31DA296B772EADD770@phx.gbl%3e</A></LI>
+ <LI>Meeraj code description<BR>
+<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3CBAY105-F7123B0C05FE260B65B8D3DD750@phx.gbl%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3cBAY105-F7123B0C05FE260B65B8D3DD750@phx.gbl%3e</A></LI>
+ <LI>Meeraj note on running the demo<BR>
+<A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3C53EC6802E2BF4643BBD5BC34D2C3A3830279C142@SPR3V4.office.local%3E" class="external-link" rel="nofollow">http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200703.mbox/%3c53EC6802E2BF4643BBD5BC34D2C3A3830279C142@SPR3V4.office.local%3e</A></LI>
+</UL>
+
+
+<H2><A name="FederationNotes-BuildingTheDemo"></A>Building The Demo</H2>
+
+<H3><A name="FederationNotes-FromTheTSSTag"></A>From The TSS Tag</H3>
+
+<P>Follow instructions in README.txt here <A href="http://svn.apache.org/repos/asf/incubator/tuscany/java/distribution/sca/tsss-demo/" class="external-link" rel="nofollow">http://svn.apache.org/repos/asf/incubator/tuscany/java/distribution/sca/tsss-demo/</A><BR>
+Unzip the resulting demo zip file<BR>
+Meeraj's discussion of switching from JXTA to JSM <A href="http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg15731.html" class="external-link" rel="nofollow">http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg15731.html</A><BR>
+I had problems in that some of the required dependency JARs were missing. I copied:</P>
+<UL>
+ <LI>tuscany-jms-discovery-0.1-incubating-SNAPSHOT.jar</LI>
+ <LI>apache-activemq-4.1.0-incubator.jar</LI>
+ <LI>tuscany-http-jetty-0.1-incubating-SNAPSHOT.jar</LI>
+ <LI>jetty-6.1.0.jar</LI>
+ <LI>jetty-util-6.1.0.jar</LI>
+ <LI>tuscany-sca-console-0.1-incubating-SNAPSHOT.jar</LI>
+ <LI>geronimo-j2ee-connector_1.5_spec-1.0.jar</LI>
+</UL>
+
+
+<P>into each of the profiles boot directories</P>
+
+<H3><A name="FederationNotes-ManuallyFromHead"></A>Manually From Head</H3>
+<P>I couldn't get this to work as the core tests now fail</P>
+
+<H2><A name="FederationNotes-DebuggingTheDemo"></A>Debugging The Demo</H2>
+<P>When run originally the demo complained about missing dependencies. In particular when reading the system components (root.system) I got the error:</P>
+
+<P>org.apache.tuscany.host.runtime.InitializationException: org.apache.tuscany.spi.<BR>
+component.GroupInitializationException: sca://root.system/main<BR>
+ at org.apache.tuscany.core.runtime.AbstractRuntime.initialize(AbstractRu<BR>
+ntime.java)<BR>
+ at org.apache.tuscany.standalone.server.TuscanyServer.startRuntime(Tusca<BR>
+nyServer.java:134)</P>
+
+<P>What this actually means is that Tuscany failed to load one of the system components successfully but, by default, doesn't tell what the issue is. I wanted to use Eclipse to debug it so I played about a bit but couldn't get the java -jar command line to come up in the Eclipse debugger. As a fall back I started a remote debugging session. There were three steps to this. </P>
+
+<P>Add a trap to the code to give me a chance to attach the debugger. I added the following lines to the mainline of the:</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+ <SPAN class="code-object">System</SPAN>.out.println(<SPAN class="code-quote">&quot;press a key&quot;</SPAN>);
+ java.io.BufferedReader stdin = <SPAN class="code-keyword">new</SPAN> java.io.BufferedReader(<SPAN class="code-keyword">new</SPAN> java.io.InputStreamReader(<SPAN class="code-object">System</SPAN>.in));
+ <SPAN class="code-object">String</SPAN> line = stdin.readLine();
+</PRE>
+</DIV></DIV>
+
+<P>Start java app with remote debugging enabled. There are plenty of references on the web on how to do this. Here is the comman line I used to start the master profile.</P>
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+java -Xrunjdwp:server=y,transport=dt_socket,address=4142,suspend=n -Dtuscany.adminPort=2000 -jar server.start.jar ma
+ster
+</PRE>
+</DIV></DIV>
+
+<P>When the app comes up and stops at the trap connect the Eclipse debugger by selecting the remote debugging profile and specifying localhost:4142 as the connection details. The port number (4142) just comes from that specified on the application command line. </P>
+
+<H2><A name="FederationNotes-TurningLoggingOn"></A>Turning Logging On</H2>
+<P>Its not clear how to do this just yet. Meeraj suggests that the missing nested exception detail can be printed out by specifying a log formatter. TODO.</P>
+
+<H2><A name="FederationNotes-RunningTheDemo"></A>Running The Demo</H2>
+
+<P>(From Meeraj's post on the subject)<BR>
+This is how you start the servers (Please make sure you start ActiveMQ<BR>
+before you start the servers) .</P>
+
+<P>Master: java -Dtuscany.adminPort=2000 -jar server.start.jar master<BR>
+Slave1: java -Dtuscany.adminPort=3000 -jar server.start.jar slave1<BR>
+Slave2: java -Dtuscany.adminPort=4000 -jar server.start.jar slave2</P>
+
+<P>You can access the admin console from <A href="http://localhost:7000/scdlForm" class="external-link" rel="nofollow">http://localhost:7000/scdlForm</A> and<BR>
+if you target the deployed SCDL to slave1, access the demo appilcation<BR>
+from <A href="http://localhsot:8000/calculatorForm" class="external-link" rel="nofollow">http://localhsot:8000/calculatorForm</A>. The test scdl is as follows<BR>
+(this is what you submit from the admin console to target a deployment<BR>
+to a slave),</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-xml">
+&lt;composite xmlns=<SPAN class="code-quote">&quot;http://www.osoa.org/xmlns/sca/1.0&quot;</SPAN>
+ <SPAN class="code-keyword">xmlns:tuscany</SPAN>=<SPAN class="code-quote">&quot;http://tuscany.apache.org/xmlns/sca/2.0-alpha&quot;</SPAN>
+ name=<SPAN class="code-quote">&quot;CalculatorComposite&quot;</SPAN>&gt;
+
+ <SPAN class="code-tag">&lt;component runtimeId=<SPAN class="code-quote">&quot;slave1&quot;</SPAN> name=<SPAN class="code-quote">&quot;CalculatorServiceComponent&quot;</SPAN>&gt;</SPAN>
+ <SPAN class="code-tag">&lt;implementation.java class=<SPAN class="code-quote">&quot;calculator.CalculatorServiceImpl&quot;</SPAN>/&gt;</SPAN>
+ <SPAN class="code-tag">&lt;reference name=<SPAN class="code-quote">&quot;addService&quot;</SPAN> target=<SPAN class="code-quote">&quot;AddServiceComponent&quot;</SPAN>/&gt;</SPAN>
+ &lt;reference name=<SPAN class="code-quote">&quot;subtractService&quot;</SPAN>
+target=<SPAN class="code-quote">&quot;SubtractServiceComponent&quot;</SPAN>/&gt;
+ &lt;reference name=<SPAN class="code-quote">&quot;multiplyService&quot;</SPAN>
+target=<SPAN class="code-quote">&quot;MultiplyServiceComponent&quot;</SPAN>/&gt;
+ &lt;reference name=<SPAN class="code-quote">&quot;divideService&quot;</SPAN>
+target=<SPAN class="code-quote">&quot;DivideServiceComponent&quot;</SPAN>/&gt;
+ <SPAN class="code-tag">&lt;/component&gt;</SPAN>
+
+ <SPAN class="code-tag">&lt;component runtimeId=<SPAN class="code-quote">&quot;slave1&quot;</SPAN> name=<SPAN class="code-quote">&quot;AddServiceComponent&quot;</SPAN>&gt;</SPAN>
+ <SPAN class="code-tag">&lt;implementation.java class=<SPAN class="code-quote">&quot;calculator.AddServiceImpl&quot;</SPAN>/&gt;</SPAN>
+ <SPAN class="code-tag">&lt;/component&gt;</SPAN>
+
+ <SPAN class="code-tag">&lt;component runtimeId=<SPAN class="code-quote">&quot;slave1&quot;</SPAN> name=<SPAN class="code-quote">&quot;SubtractServiceComponent&quot;</SPAN>&gt;</SPAN>
+ <SPAN class="code-tag">&lt;implementation.java class=<SPAN class="code-quote">&quot;calculator.SubtractServiceImpl&quot;</SPAN>/&gt;</SPAN>
+ <SPAN class="code-tag">&lt;/component&gt;</SPAN>
+
+ <SPAN class="code-tag">&lt;component runtimeId=<SPAN class="code-quote">&quot;slave1&quot;</SPAN> name=<SPAN class="code-quote">&quot;MultiplyServiceComponent&quot;</SPAN>&gt;</SPAN>
+ <SPAN class="code-tag">&lt;implementation.java class=<SPAN class="code-quote">&quot;calculator.MultiplyServiceImpl&quot;</SPAN>/&gt;</SPAN>
+ <SPAN class="code-tag">&lt;/component&gt;</SPAN>
+
+ <SPAN class="code-tag">&lt;component runtimeId=<SPAN class="code-quote">&quot;slave1&quot;</SPAN> name=<SPAN class="code-quote">&quot;DivideServiceComponent&quot;</SPAN>&gt;</SPAN>
+ <SPAN class="code-tag">&lt;implementation.java class=<SPAN class="code-quote">&quot;calculator.DivideServiceImpl&quot;</SPAN>/&gt;</SPAN>
+ <SPAN class="code-tag">&lt;/component&gt;</SPAN>
+
+<SPAN class="code-tag">&lt;/composite&gt;</SPAN>
+</PRE>
+</DIV></DIV>
+
+<P>Here is the actual sequence of events:</P>
+
+<P>Start ActiveMQ</P>
+
+<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
+<PRE class="code-java">
+java -Dtuscany.adminPort=2000 -jar server.start.jar master
+java -Dtuscany.adminPort=3000 -jar server.start.jar slave1
+java -Dtuscany.adminPort=4000 -jar server.start.jar slave2
+</PRE>
+</DIV></DIV>
+
+<P>Each of these just reports &quot;Started&quot; on the command line</P>
+
+<P>Go to <A href="http://localhost:7000/scdlForm" class="external-link" rel="nofollow">http://localhost:7000/scdlForm</A> in a browser and paste in the SCDL from above to configure slave1 to create and wire the calculator components.</P>
+
+<P>Go to <A href="http://localhsot:8000/calculatorForm" class="external-link" rel="nofollow">http://localhsot:8000/calculatorForm</A> in a browser and see the form that drives the calculator sample. Type in a couple of numbers and press Add.</P>
+
+
+ </DIV>
+ </DIV>
+ </DIV>
+ <!-- pageContent macro end -->
+
+ </TD>
+ </TR>
+ </TABLE>
+
+ <!-- footer macro -->
+ <SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+ </SCRIPT>
+ <SCRIPT type="text/javascript">
+ _uacct = "UA-1174707-5";
+ urchinTracker();
+ </SCRIPT>
+
+ <A href="http://www.statcounter.com/" target="_blank"><IMG src="http://c26.statcounter.com/counter.php?sc_project=2619156&java=0&security=94bd7e7d&invisible=0" alt="website stats" border="0"></A>
+
+ <DIV class="footer">
+ Copyright � 2003-2012, The Apache Software Foundation&nbsp;&nbsp;</BR>
+ Apache Tuscany and the Apache Tuscany project logo are trademarks of The Apache Software Foundation.
+ </DIV>
+ <!-- footer macro end -->
+
+ </BODY>
+</HTML>