summaryrefslogtreecommitdiffstats
path: root/site/trunk/site-publish/documentation-2x/tuscany-runtime-overview.html
blob: 17d511af69f178b3e60733e09fab0d892b11b990 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
  <HEAD>
    <LINK type="text/css" rel="stylesheet" href="resources/space.css">
    <STYLE type="text/css">
      .footer {
        background-image:      url('http://cwiki.apache.org/confluence/images/border/border_bottom.gif');
        background-repeat:     repeat-x;
        background-position:   left top;
        padding-top:           4px;
        color:                 #666;
      }
    </STYLE>
    <SCRIPT type="text/javascript" language="javascript">
      var hide = null;
      var show = null;
      var children = null;

      function init() {
        /* Search form initialization */
        var form = document.forms['search'];
        if (form != null) {
          form.elements['domains'].value = location.hostname;
          form.elements['sitesearch'].value = location.hostname;
        }

        /* Children initialization */
        hide = document.getElementById('hide');
        show = document.getElementById('show');
        children = document.all != null ?
                   document.all['children'] :
                   document.getElementById('children');
        if (children != null) {
          children.style.display = 'none';
          show.style.display = 'inline';
          hide.style.display = 'none';
        }
      }

      function showChildren() {
        children.style.display = 'block';
        show.style.display = 'none';
        hide.style.display = 'inline';
      }

      function hideChildren() {
        children.style.display = 'none';
        show.style.display = 'inline';
        hide.style.display = 'none';
      }
    </SCRIPT>
    <TITLE>Tuscany Runtime Overview</TITLE>
  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
  <BODY onload="init()">
    <TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
      <TR class="topBar">
        <TD align="left" valign="middle" class="topBarDiv" align="left" nowrap="">
          &nbsp;<A href="index.html" title="Apache Tuscany Docs 2.x">Apache Tuscany Docs 2.x</A>&nbsp;&gt;&nbsp;<A href="index.html" title="Index">Index</A>&nbsp;&gt;&nbsp;<A href="development-guides.html" title="Development Guides">Development Guides</A>&nbsp;&gt;&nbsp;<A href="" title="Tuscany Runtime Overview">Tuscany Runtime Overview</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>

    <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="/wiki/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">Tuscany Runtime Overview</DIV>

        <DIV class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
          <A href="http://cwiki.apache.org/confluence/pages/editpage.action?pageId=5964723">
            <IMG src="http://cwiki.apache.org/confluence/images/icons/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
            <A href="http://cwiki.apache.org/confluence/pages/editpage.action?pageId=5964723">Edit Page</A>
          &nbsp;
          <A href="http://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x">
            <IMG src="http://cwiki.apache.org/confluence/images/icons/browse_space.gif" height="16" width="16" border="0" align="absmiddle" title="Browse Space"></A>
            <A href="http://cwiki.apache.org/confluence/pages/listpages.action?key=TUSCANYxDOCx2x">Browse Space</A>
          &nbsp;
          <A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964723">
            <IMG src="http://cwiki.apache.org/confluence/images/icons/add_page_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add Page"></A>
          <A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964723">Add Page</A>
          &nbsp;
          <A href="http://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964723">
            <IMG src="http://cwiki.apache.org/confluence/images/icons/add_blogentry_16.gif" height="16" width="16" border="0" align="absmiddle" title="Add News"></A>
          <A href="http://cwiki.apache.org/confluence/pages/createblogpost.action?spaceKey=TUSCANYxDOCx2x&fromPageId=5964723">Add News</A>
        </DIV>
      </DIV>
      <DIV class="pagesubheading" style="margin: 0px 10px 0px 10px;">
                    Added by <A href="http://cwiki.apache.org/confluence/users/viewuserprofile.action?username=slaws">Simon Laws</A>, last edited by <A href="http://cwiki.apache.org/confluence/users/viewuserprofile.action?username=slaws">Simon Laws</A> on Nov 13, 2009
                      &nbsp;(<A class="noprint" href="http://cwiki.apache.org/confluence/pages/diffpages.action?pageId=5964723&originalId=5964756">view change</A>)
              
      </DIV>

      <DIV class="pagecontent">
        <DIV class="wiki-content">
          <H1><A name="TuscanyRuntimeOverview-SoftwareOrganization"></A>Software Organization</H1>
<H3><A name="TuscanyRuntimeOverview-SourceCodeLocations"></A>Source Code Locations</H3>
<P>If you take a Tuscany SCA Java source distribution or look in the Tuscany subversion repository (<A href="http://svn.apache.org/repos/asf/tuscany/java/sca/" rel="nofollow">http://svn.apache.org/repos/asf/tuscany/java/sca/</A>) you'll see the code layed out as follows:</P>

<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
BUILDING
CHANGES
LICENSE
NOTICE
README
RELEASE_NOTES
archetypes    - Maven archetypes <SPAN class="code-keyword">for</SPAN> creating Tuscany project templates
distribution  - the code that defines and build Tuscany distributions
features      - Maven projects that collect together Tuscany features 
itest         - project integration tests
modules       - the source code <SPAN class="code-keyword">for</SPAN> the runtime and the SCA extensions
pom.xml       
samples       - project samples
shades        - TBD
</PRE>
</DIV></DIV>

<P>There is some related source code  that's worth mentioning up front. Firstly the project Maven build relies on a set of Maven plugins that have been written specifically for Tuscany. They can also be found in the Tuscany subversion repository (<A href="http://svn.apache.org/repos/asf/tuscany/maven-plugins/trunk/" rel="nofollow">http://svn.apache.org/repos/asf/tuscany/maven-plugins/trunk/</A>) and are as follows:</P>

<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
maven-bundle-plugin     - Creates Tuscany OSGi bundles based on the Tuscany modules and their dependencies
                          also generates eclipse PDE projects <SPAN class="code-keyword">for</SPAN> Tuscany modules
maven-eclipse-compiler  - Compiles using the Eclipse compiler and performs OSGi validation
maven-java2wsdl-plugin  - TBD
maven-osgi-junit        - Runs Junit tests in an OSGi environment
maven-tuscany-plugin    - TBD
maven-wsdl2java-plugin  - TBD
</PRE>
</DIV></DIV>

<P>Secondly there are a set of tests that the OASIS SCA specifications define called otests. These test the Tuscany SCA runtime for compliance with the specifications. The tests themselves are stored in the OASIS subversion system (<A href="http://tools.oasis-open.org/version-control/browse/" rel="nofollow">http://tools.oasis-open.org/version-control/browse/</A>). Tuscany has a set of modules that retrieve these tests automatically and configure the Tuscany environment to run them (<A href="http://svn.apache.org/repos/asf/tuscany/otest/" rel="nofollow">http://svn.apache.org/repos/asf/tuscany/otest/</A>) as follows:</P>

<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
README
build.xml                    - Ant utility script
pom.xml
sca-assembly                 - Generated automatically by svn externals when you check <SPAN class="code-keyword">this</SPAN> directory out
sca-java-caa                 - Generated automatically by svn externals when you check <SPAN class="code-keyword">this</SPAN> directory out
sca-java-ci                  - Generated automatically by svn externals when you check <SPAN class="code-keyword">this</SPAN> directory out
sca-policy                   - Generated automatically by svn externals when you check <SPAN class="code-keyword">this</SPAN> directory out
tuscany-java-caa-test-runner - Java Common Annotations and APIs test runner
tuscany-java-ci-test-runner  - Java Component Implementation test runner
tuscany-policy-test-runner   - Policy test runner
tuscany-test-runner          - Assembly test runner
</PRE>
</DIV></DIV>

<H3><A name="TuscanyRuntimeOverview-SCAJavaModules"></A>SCA Java Modules</H3>
<P>All of the functional code in Tuscany Java SCA can be found under the modules directory. There are a lot of sub-directories here but they basically fall into one of two categories, core function or extensions. We are using the term extension here in the sense that the SCA Assembly specification talks about and extension model You always have to have the core functions but most of the extensions are optional (we say most here because without some of the basic extensions the runtime won't do anything)  Finding extension modules is easy. Modules that start with the following words are extensions.</P>

<DIV class="code panel" style="border-width: 1px;"><DIV class="codeContent panelContent">
<PRE class="code-java">
binding
databinding
implementation
<SPAN class="code-keyword">interface</SPAN>
policy
</PRE>
</DIV></DIV>

<P>As you can see SCA extensions relate to the extensible parts of the SCA composite file. For example, if you want to use &lt;binding.jms/&gt; in you SCA composite files then you need to include the Tuscany modules for this extension in you installation. In this case that would mean the modules binding-jms and binding-jms-runtime. <BR>
All of the other modules in the modules directory are core modules and are generally required to be present in you Tuscany runtime installation. The use of the word &quot;generally&quot; here sounds a bit vague. This is because the Tuscany runtime itself is based on an extensibility mechanism which means that many parts of the runtime (as well as the SCA extensions) are pluggable. In this way, for example, different hosting environments can be supported. Well talk about runtime extensibility further down this article but for the time being consider all core modules to be mandatory. </P>

<H1><A name="TuscanyRuntimeOverview-RuntimeBuildingBlocks"></A>Runtime Building Blocks</H1>

<P>As you may have realized the Tuscany SCA Java runtime is just a Java program that, once started listens for incoming messages (via SCA component services) and, sometimes responds with outgoing messages (via SCA component references).</P>

<P><IMG src="tuscany-runtime-overview.data/tuscany-runtime-context.png" align="absmiddle" border="0"></P>

<P>The runtime then provides the context within which SCA composite applications run. If we crack open the Tuscany Runtime box we see the following structure.</P>

<P><IMG src="tuscany-runtime-overview.data/tuscany-runtime-structure.png" align="absmiddle" border="0"></P>

<P>We'll take a high level look at these different blocks in turn starting with Core.</P>

<H1><A name="TuscanyRuntimeOverview-TuscanyCore"></A>Tuscany Core</H1>
<H2><A name="TuscanyRuntimeOverview-OSGiandJSE"></A>OSGi and JSE</H2>
<P>The Tuscany runtime will work in the JSE environment and when deployed to an OSGi runtime like Felix or Equinox. Since 1.x we have been through an exercise of refactoring all of the runtime modules in OSGi bundles and providing consistent OSGi manifest files. See (???) for more details on how we OSGi-igfied the Tuscany runtime. </P>

<H2><A name="TuscanyRuntimeOverview-RuntimeExtensibility"></A>Runtime Extensibility</H2>
<H2><A name="TuscanyRuntimeOverview-RuntimeModularity"></A>Runtime Modularity</H2>
<H1><A name="TuscanyRuntimeOverview-TuscanySPI"></A>Tuscany SPI</H1>

<H1><A name="TuscanyRuntimeOverview-SCAExtensions"></A>SCA Extensions</H1>

<H1><A name="TuscanyRuntimeOverview-TuscanyAPI"></A>Tuscany API</H1>

<H1><A name="TuscanyRuntimeOverview-TuscanyHosting"></A>Tuscany Hosting</H1>
<H1><A name="TuscanyRuntimeOverview-RuntimeFeatures"></A>Runtime Features</H1>
<H1><A name="TuscanyRuntimeOverview-DomainandNodes"></A>Domain and Nodes</H1>
<H1><A name="TuscanyRuntimeOverview-RuntimeLifecycle"></A>Runtime Lifecycle</H1>
<H2><A name="TuscanyRuntimeOverview-Read"></A>Read</H2>
<H2><A name="TuscanyRuntimeOverview-Resolve"></A>Resolve</H2>
<H2><A name="TuscanyRuntimeOverview-Build"></A>Build</H2>
<H2><A name="TuscanyRuntimeOverview-Activate"></A>Activate</H2>
<H2><A name="TuscanyRuntimeOverview-Start"></A>Start</H2>
<H2><A name="TuscanyRuntimeOverview-Stop"></A>Stop</H2>

        </DIV>

        
      </DIV>
    </DIV>
    <DIV class="footer">
      Generated by
      <A href="http://www.atlassian.com/confluence/">Atlassian Confluence</A> (Version: 2.10.3 Build: 1519 Apr 15, 2009)
      <A href="http://could.it/autoexport/">Auto Export Plugin</A> (Version: 1.0.0.beta1)
    </DIV>
  </BODY>
</HTML>