summaryrefslogtreecommitdiffstats
path: root/site/trunk/site-publish/java-sca-architecture-guide.html
diff options
context:
space:
mode:
Diffstat (limited to 'site/trunk/site-publish/java-sca-architecture-guide.html')
-rw-r--r--site/trunk/site-publish/java-sca-architecture-guide.html367
1 files changed, 367 insertions, 0 deletions
diff --git a/site/trunk/site-publish/java-sca-architecture-guide.html b/site/trunk/site-publish/java-sca-architecture-guide.html
new file mode 100644
index 0000000000..e75b13fa25
--- /dev/null
+++ b/site/trunk/site-publish/java-sca-architecture-guide.html
@@ -0,0 +1,367 @@
+
+<!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="http://people.apache.org/~svkrish/tuscanySite/style/default.css">
+ <LINK rel="SHORTCUT ICON" href="http://cwiki.apache.org/confluence/display/TUSCANY/$images/favicon.ico">
+ <TITLE>Java SCA Architecture Guide : Apache Tuscany</TITLE>
+ <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+
+ <BODY onload="init()">
+
+ <TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://people.apache.org/~svkrish/tuscanySite/images/TuscanyLogoNEW_Text_120px_bg.jpg">
+ <TR>
+ <TD valing="top" align="left">
+ <A href="http://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://people.apache.org/~svkrish/tuscanySite/images/TuscanyLogoNEW_Text_120px_bg.jpg" height="91" width="25" border="0"></A>
+ </TD>
+ <TD>
+ <A href="http://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://people.apache.org/~svkrish/tuscanySite/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="http://cwiki.apache.org/confluence/pages/editpage.action?pageId=45023">
+ <IMG src="http://people.apache.org/~svkrish/tuscanySite/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
+ </DIV>
+ </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%">
+ &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="java-sca-subproject.html" title="Java SCA Subproject">Java SCA Subproject</A>&nbsp;&gt;&nbsp;<A href="java-sca-documentation-menu.html" title="Java SCA Documentation Menu">Java SCA Documentation Menu</A>&nbsp;&gt;&nbsp;<A href="" title="Java SCA Architecture Guide">Java SCA Architecture Guide</A>
+ </TD>
+
+ <TD align="left" valign="middle" class="topBarDiv" nowrap="true">
+ <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A>&nbsp;&nbsp;
+ </TD>
+ </TR>
+ </TABLE>
+
+ <TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF">
+ <TR>
+ <TD align="left" valign="top">
+ <DIV id="PageContent">
+
+ <DIV class="pagecontent">
+ <DIV class="wiki-content">
+ <TABLE class="sectionMacroWithBorder" border="0" cellpadding="5" cellspacing="0" width="100%"><TBODY><TR>
+<TD class="confluenceTd" valign="top" width="15%">
+<DIV class="panel" style="border-style: solid; border-color: #C3CDA1; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #C3CDA1; background-color: #C3CDA1; "><B>General</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="home.html" title="Home">Home</A><BR>
+<SPAN class="nobr"><A href="http://www.apache.org/licenses/LICENSE-2.0.html" title="Visit page outside Confluence" rel="nofollow">License <SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+<A href="tuscany-downloads.html" title="Tuscany Downloads">Downloads</A><BR>
+<A href="issue-tracking.html" title="Issue Tracking">Found a Bug?</A></P>
+</DIV></DIV>
+<DIV class="panel" style="border-style: solid; border-color: #b4b4b5; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #b4b4b5; background-color: #C3CDA1; "><B>Tuscany SCA</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="sca-overview.html" title="SCA Overview">SCA Overview</A><BR>
+<A href="java-sca-subproject.html" title="Java SCA Subproject">SCA Java</A><BR>
+<A href="sca-cpp.html" title="SCA CPP">SCA Native</A><BR>
+<A href="php-sca.html" title="PHP SCA">PHP SCA</A></P>
+</DIV></DIV>
+
+
+<DIV class="panel" style="border-style: solid; border-color: #b4b4b5; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #b4b4b5; background-color: #C3CDA1; "><B>Documentation</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="sca-java-user-guide.html" title="SCA Java User Guide">User Guide</A><BR>
+<A href="" title="Java SCA Architecture Guide">Architecture Guide</A><BR>
+<A href="sca-java-development-guide.html" title="SCA Java Development Guide">Developer Guide</A><BR>
+<A href="java-sca-extension-developer-guide.html" title="Java SCA Extension Developer Guide">Extension Developer Guide</A></P>
+</DIV></DIV>
+
+<DIV class="panel" style="border-style: solid; border-color: #b4b4b5; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #b4b4b5; background-color: #C3CDA1; "><B>Resources</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1; ">
+<P><A href="tuscany-sca-java-faq.html" title="Tuscany SCA Java - FAQ">FAQ</A><BR>
+<SPAN class="nobr"><A href="https://svn.apache.org/repos/asf/incubator/tuscany/java/sca" title="Visit page outside Confluence" rel="nofollow">Source Code<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+</DIV></DIV>
+</TD>
+<TD class="confluenceTd" valign="top" width="85%">
+
+<DIV class="panel" style="border-style: solid; border-color: #6699ff; "><DIV class="panelHeader" style="border-bottom-style: solid; border-bottom-color: #6699ff; background-color: #D5EFFF; "><B>Apache Tuscany SCA Java Architecture Guide</B></DIV><DIV class="panelContent" style="background-color: #ffffff; ">
+<P><B>This page is work in progress. Thanks for your contribution</B> <IMG class="emoticon" src="http://cwiki.apache.org/confluence/images/icons/emoticons/smile.gif" height="20" width="20" align="absmiddle" alt="" border="0"></P>
+<UL>
+ <LI><A href="#JavaSCAArchitectureGuide-Overview" title="Overview on Java SCA Architecture Guide">Overview</A>
+ <UL>
+ <LI><A href="#JavaSCAArchitectureGuide-CoreDefinition" title="Core Definition on Java SCA Architecture Guide">Core</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-ExtensionDefinition" title="Extension Definition on Java SCA Architecture Guide">Extension</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-RuntimeDefinition" title="Runtime Definition on Java SCA Architecture Guide">Runtime</A></LI>
+ </UL>
+ </LI>
+ <LI><A href="#JavaSCAArchitectureGuide-InternalsHighLevelView" title="Internals High Level View on Java SCA Architecture Guide">Internals High Level View</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-Bootstrap" title="Bootstrap on Java SCA Architecture Guide">Bootstrap</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-Metadata" title="Metadata on Java SCA Architecture Guide">Metadata</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-Contribution" title="Contribution on Java SCA Architecture Guide">Contribution</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-BindingExtension" title="Binding Extension on Java SCA Architecture Guide">Binding Extension</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-ComponentImplementationExtension" title="Component Implementation Extension on Java SCA Architecture Guide">Component Implementation Extension</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-DataBindingExtension" title="Data Binding Extension on Java SCA Architecture Guide">Data Binding Extension</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-Wiring" title="Wiring on Java SCA Architecture Guide">Wiring</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-LoadingSCAassemblies" title="Loading SCA assemblies on Java SCA Architecture Guide">Loading SCA assemblies</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-SpringIntegration" title="Spring Integration on Java SCA Architecture Guide">Spring Integration</A>
+ <UL>
+ <LI><A href="#JavaSCAArchitectureGuide-Springascomponentimplementation" title="Spring as component implementation on Java SCA Architecture Guide">Spring as component implementation</A></LI>
+ <LI><A href="#JavaSCAArchitectureGuide-SpringasIOCcontainer" title="Spring as IOC container on Java SCA Architecture Guide">Spring as IOC container</A></LI>
+ </UL>
+ </LI>
+</UL>
+</DIV></DIV>
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-Overview"></A> <FONT color="#0099cc">Overview</FONT></H3>
+
+<P>The SCA Java runtime is composed of core and extensions. The core is essentially a multi-VM wiring engine that connects components together using the principles of <SPAN class="nobr"><A href="http://en.wikipedia.org/wiki/Dependency_injection" title="Visit page outside Confluence" rel="nofollow">Dependency Injection<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN>, or <SPAN class="nobr"><A href="http://en.wikipedia.org/wiki/Inversion_of_control" title="Visit page outside Confluence" rel="nofollow">Inversion of Control<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.</P>
+
+<H4><A name="JavaSCAArchitectureGuide-Core"></A><A name="JavaSCAArchitectureGuide-CoreDefinition"></A> Core</H4>
+
+<P>The Core is designed to be simple and limited in its capabilities. It wires functional units together and provides SPIs that extensions can interact with. Capabilities such as service discovery, reliability, support for transport protocols, etc. are provided through extensions.</P>
+
+<H4><A name="JavaSCAArchitectureGuide-Extension"></A><A name="JavaSCAArchitectureGuide-ExtensionDefinition"></A> Extension</H4>
+
+<P>Extensions enhance SCA runtime functionality. Extension types are not fixed and core is designed to be as flexible as possible by providing an open-ended extension model. However, there are a number of known extension types defined including:</P>
+<UL>
+ <LI><B>Component implementation types</B>, e.g. Spring, Groovy, and JavaScript</LI>
+ <LI><B>Binding types</B>, e.g. Axis, CXF, AMQP, ActiveMQ, JXTA</LI>
+ <LI><B>DataBinding types</B>, e.g. JAXB, SDO, XmlBeans</LI>
+ <LI><B>Interface Binding types</B>, e.g. WSDL, Java</LI>
+</UL>
+
+
+<P>Details of how to implement an extension can be can be found in the <SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANY&title=SCA%20Java%20Extension%20Developer%20Guide&linkCreation=true&fromPageId=45023" title="Create Page: SCA Java Extension Developer Guide" class="createlink">Extensions Guide<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.</P>
+
+<H4><A name="JavaSCAArchitectureGuide-Runtime"></A><A name="JavaSCAArchitectureGuide-RuntimeDefinition"></A> Runtime</H4>
+
+<P>The core is designed to be embedded in, or provisioned to, a number of different host environments. For example, the core may be provisioned to an OSGi container, a standalone runtime, a servlet engine, or J2EE application server. Runtime capabilities may vary based on the host environment.</P>
+
+<P></P>
+
+<H4><A name="JavaSCAArchitectureGuide-HighleveloverviewofJavaSCAruntime"></A>High level overview of Java SCA runtime</H4>
+
+<P>The diagram shown below is a high level view of the SCA runtime which consists of the following key modules/packages:</P>
+<OL>
+ <LI>SCA Spec API: The APIs defined by the SCA Java Client and Implementation Spec</LI>
+ <LI>API: Tuscany APIs which extend the SCA spec APIs</LI>
+ <LI>Core: The runtime implementation and the SPIs to extend it</LI>
+ <LI>Extensions:
+ <OL>
+ <LI>Container implementation - For extending language support, for example BPEL, Python, C++, Ruby,..</LI>
+ <LI>Binding - for extending protocol support, for example Axis2, CXF,..</LI>
+ <LI>Interface Binding - for service definition, for example WSDL, Java, ...</LI>
+ <LI>Databinding - for extending data support, for example SDO, JAXB, ...</LI>
+ </OL>
+ </LI>
+ <LI>Host Platforms: The environments that host the Tuscany runtime.</LI>
+</OL>
+
+
+<P><IMG src="java-sca-architecture-guide.data/architectureOverview.jpg" align="absmiddle" border="0"></P>
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-InternalsHighLevelView"></A><FONT color="#0099cc">Internals High Level View</FONT></H3>
+
+<P>[Note: Do we want to link to <A href="java-sca-modulization-design-discussions.html" title="Java SCA Modulization Design Discussions">Kernel-Structure</A>]?</P>
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-Bootstrap"></A><FONT color="#0099cc">Bootsrap</FONT></H3>
+
+<P>Bootstrap process is controlled by Host environment. The default process is implemented in DefaultBootstrapper.<BR>
+The runtime processes service assemblies serialized using SCA Assembly XML which can take other forms.</P>
+<UL>
+ <LI>The load phase processes SCDL and creates an in-memory model and produces corresponding runtime artifacts (e.g. components, services, references)</LI>
+ <LI>The connect/wire phase wires references to services</LI>
+</UL>
+
+
+<P><IMG src="java-sca-architecture-guide.data/bootstrap.jpg" align="absmiddle" border="0"></P>
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-Metadata"></A><FONT color="#0099cc">Metadata</FONT></H3>
+
+<P><IMG src="java-sca-architecture-guide.data/assembly.jpg" align="absmiddle" border="0"></P>
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-Contribution"></A><FONT color="#0099cc">Contribution</FONT></H3>
+
+<P><IMG src="java-sca-architecture-guide.data/contribution_overview.jpg" align="absmiddle" border="0"></P>
+
+<UL>
+ <LI>Package processors scans the contribution being installed and generate a list of artifacts that needs to be processed. Currently there is support for folder/file system and jar contribution packages. In order to be available to the contribution service, a package processors needs to register itself with the package processor extension.</LI>
+</UL>
+
+
+<UL>
+ <LI>Artifact processors are used to process each artifact available on the contribution. In order to be available to the contribution service, a artifact processor needs to register itself with the artifact processor extension. An artifact processor will be called for each artifact in two phases :</LI>
+</UL>
+
+
+<UL>
+ <LI>
+ <UL>
+ <LI>read phase : This is where you read an artifact (a document, an XML element, classes etc.), populate a model representing the artifact and return it. The SCA contribution service calls ArtifactProcessor.read() on all artifacts that have an ArtifactProcessor registered for them. If your model points to other models, instead of trying to load these other models right away, you should just keep the information representing that reference, which you'll turn into a pointer to the referenced model in the resolve() phase. Note that you don't necessarily need to fully read and populate your model at this point, you can choose to complete it later.</LI>
+ </UL>
+ </LI>
+</UL>
+
+
+<UL>
+ <LI>
+ <UL>
+ <LI>resolve phase : This phase gives you the opportunity to resolve references to other models (a WSDL, a class, another composite, a componentType). At this point, all models representing the artifacts in your SCA contribution have been read, registered in the contribution's ArtifactResolver, and are ready to be resolved.</LI>
+ </UL>
+ </LI>
+</UL>
+
+
+<UL>
+ <LI>All deployable composites should be now ready to get deployed to the SCA Domain</LI>
+</UL>
+
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-BindingExtension"></A><FONT color="#0099cc">Binding Extension</FONT></H3>
+
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-ComponentImplementationExtension"></A><FONT color="#0099cc">Component Implementation Extension</FONT></H3>
+
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-DataBindingExtension"></A><FONT color="#0099cc">Data Binding Extension</FONT></H3>
+
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-Wiring"></A><FONT color="#0099cc">Wiring</FONT></H3>
+
+<P><SPAN class="nobr"><A href="http://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=TUSCANY&title=This%20section%20needs%20to%20be%20updated&linkCreation=true&fromPageId=45023" title="Create Page: This section needs to be updated" class="createlink">This section needs to be updated<SUP><IMG class="rendericon" src="http://cwiki.apache.org/confluence/images/icons/plus.gif" height="7" width="7" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+To understand how wiring works, we need to detail how Components function in the system. Let's start with Atomic Components and then discuss Composite Components.<IMG src="java-sca-architecture-guide.data/runtime-wire.jpg" align="absmiddle" border="0"></P>
+
+<H4><A name="JavaSCAArchitectureGuide-AtomicComponent"></A>Atomic Component</H4>
+
+<P>AtomicComponent is the most basic component form. It corresponds to the spec concept which offers services, has references and properties</P>
+<UL>
+ <LI>Implementation types e.g. Java, XSLT, etc.</LI>
+ <LI>Are wired</LI>
+ <LI>Have properties</LI>
+</UL>
+
+
+<P>Atomic Components have implementation instances. Instances are associated with a scope: e.g. request, conversation, composite. A SCDL entry is used to define a Component.</P>
+
+<P>Atomic components use a ScopeContainer to manage implementation instances:</P>
+<UL>
+ <LI>Composite, HTTP Session, Request, Stateless</LI>
+ <LI>ScopeContainers track implementation instances by scope id and the AtomicComponent instance identity</LI>
+ <LI>Instances are stored in an InstanceWrapper which is specific to the component implementation type (e.g. PojoInstanceWrapper.java)</LI>
+</UL>
+
+
+<H4><A name="JavaSCAArchitectureGuide-ComponentWiring"></A>Component Wiring</H4>
+
+<P>Component references are connected to services through wires</P>
+<UL>
+ <LI>Two sides
+ <UL>
+ <LI>InboundWire - handles the source side of a wire, including policy</LI>
+ <LI>OutboundWire - handles the target side of a wire, including policy</LI>
+ </UL>
+ </LI>
+ <LI>The runtime connects inbound and outbound wires, performing optimizations if possible
+ <UL>
+ <LI>Inbound and outbound wires may be associated with different service contracts</LI>
+ <LI>Different implementation types</LI>
+ <LI>&quot;Standard&quot; wires contain invocation chains that have Interceptors that perform some form of mediation (e.g. policy)</LI>
+ <LI>Other wire types exist that, for example, do not perform mediations</LI>
+ </UL>
+ </LI>
+</UL>
+
+
+<H4><A name="JavaSCAArchitectureGuide-InvocationChains"></A>Invocation Chains</H4>
+
+<P><IMG class="emoticon" src="http://cwiki.apache.org/confluence/images/icons/emoticons/help_16.gif" height="16" width="16" align="absmiddle" alt="" border="0"> is &quot;around-style&quot; mediation an accepted term. If so what does it mean. Googling it doesn't return anything appropriate.<BR>
+A wire has an InvocationChain per service operation. An InvocationChain may have interceptors - &quot;around-style&quot; mediation. Component implementation instances access a wire through a WireInvocationHandler associated with a reference.</P>
+<UL>
+ <LI>WireInvocationHandlers may (or may not depending on the component type) be fronted by a proxy</LI>
+ <LI>WireInvocationHandlers dispatch an invocation to the correct chain<BR>
+A wire has a TargetInvoker that is created from the target side AtomicComponent or Reference and is stored on the source wire invocation handler. The TargetInvoker is resposnible for dispatching the request to the target instance when the message hits the end of the target invocation chain.</LI>
+</UL>
+
+
+<H4><A name="JavaSCAArchitectureGuide-InvocationOverview"></A>Invocation Overview</H4>
+
+<UL>
+ <LI>An invocation is dispatched to the WireInvocationHandler</LI>
+ <LI>The WireInvocationHandler looks up the correct InvocationChain</LI>
+ <LI>It then creates a message, sets the payload, sets the TargetInvoker, and passes the message down the chain</LI>
+ <LI>When the message reaches the end of the chain, the TargetInvoker is called, which in turn is responsible for dispatching to the target</LI>
+ <LI>Having the TargetInvoker stored on the outbound side allows it to cache the target instance when the wire source has a scope of equal or lesser value than the target (e.g. request--&gt;composite</LI>
+</UL>
+
+
+<P>The runtime provides components with InboundWires and OutboundWires. InvocationChains are held in component wires and are therefore stateless which allows for dynamic behavior such as introduction of new interceptors or re-wiring.</P>
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-LoadingSCAassemblies"></A><FONT color="#0099cc">Loading SCA assemblies</FONT></H3>
+
+
+<H4><A name="JavaSCAArchitectureGuide-ArtifactProcessor"></A>Artifact Processor</H4>
+
+<P>Artifact processors are responsible for processing each artifact available in a contribution package, these processors are going to be invoked in two phases</P>
+
+<UL>
+ <LI>read phase : This is where you read an artifact (a document, an XML element, classes etc.), populate a model representing the artifact and return it. The SCA contribution service calls ArtifactProcessor.read() on all artifacts that have an ArtifactProcessor registered for them. If your model points to other models, instead of trying to load these other models right away, you should just keep the information representing that reference, which you'll turn into a pointer to the referenced model in the resolve() phase. Note that you don't necessarily need to fully read and populate your model at this point, you can choose to complete it later.</LI>
+</UL>
+
+
+<UL>
+ <LI>resolve phase : This phase gives you the opportunity to resolve references to other models (a WSDL, a class, another composite, a componentType). At this point, all models representing the artifacts in your SCA contribution have been read, registered in the contribution's ArtifactResolver, and are ready to be resolved.</LI>
+</UL>
+
+
+<H3><A name="JavaSCAArchitectureGuide-LoadingJavaSCA"></A>Loading Java SCA</H3>
+
+<P>SCA service assemblies are deployed to the SCA domain in the format of SCDL files. Tuscany runtime artifact processor loads the SCDLs into model objects which are a set of java beans to hold the metadata.</P>
+
+<P>There are two types of loaders:</P>
+<UL>
+ <LI>StAXElementLoader: Load the XML element from the StAX events</LI>
+ <LI>ComponentTypeLoader: Load the Component Type for an implementation either by introspection or paring a side file</LI>
+</UL>
+
+
+<H3><A name="JavaSCAArchitectureGuide-LoadingComponentType"></A>Loading Component Type</H3>
+
+<P>Loads the component type definition for a specific implementation</P>
+<UL>
+ <LI>How it does this is implementation-specific</LI>
+ <LI>May load XML sidefile (location set by implementation)</LI>
+ <LI>May introspect an implementation artifact (e.g. Java annotations)</LI>
+ <LI>... or anything else</LI>
+</UL>
+
+
+<P>Loading Composite ComponentType Loader</P>
+<UL>
+ <LI>Load SCDL from supplied URL</LI>
+ <LI>Extract and load SCDL from composite package</LI>
+</UL>
+
+
+<P>POJO ComponentType Loader</P>
+<UL>
+ <LI>Introspect Java annotations</LI>
+ <LI>Uses a pluggable &quot;annotation processing&quot; framework to introspect Java classes</LI>
+</UL>
+
+
+<H3><A name="JavaSCAArchitectureGuide-Classdiagramfortheruntimeartifacts"></A>Class diagram for the runtime artifacts</H3>
+
+<P><IMG src="java-sca-architecture-guide.data/runtime-model.jpg" align="absmiddle" border="0"></P>
+
+<H3><A name="JavaSCAArchitectureGuide-"></A><A name="JavaSCAArchitectureGuide-SpringIntegration"></A><FONT color="#0099cc">Spring Integration</FONT></H3>
+</TD></TR></TBODY></TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+
+ <DIV class="footer">
+ Copyright &copy; 2003-2007, The Apache Software Foundation&nbsp;&nbsp;
+ </DIV>
+
+ </BODY>
+</HTML> \ No newline at end of file