Apache Tuscany Docs 2.x > Index > Development Guides > Tuscany Runtime Overview
Added by Simon Laws, last edited by Simon Laws on Nov 13, 2009  (view change)

Software Organization

Source Code Locations

If you take a Tuscany SCA Java source distribution or look in the Tuscany subversion repository (http://svn.apache.org/repos/asf/tuscany/java/sca/) you'll see the code layed out as follows:

BUILDING
CHANGES
LICENSE
NOTICE
README
RELEASE_NOTES
archetypes    - Maven archetypes for 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 for the runtime and the SCA extensions
pom.xml       
samples       - project samples
shades        - TBD

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 (http://svn.apache.org/repos/asf/tuscany/maven-plugins/trunk/) and are as follows:

maven-bundle-plugin     - Creates Tuscany OSGi bundles based on the Tuscany modules and their dependencies
                          also generates eclipse PDE projects for 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

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 (http://tools.oasis-open.org/version-control/browse/). Tuscany has a set of modules that retrieve these tests automatically and configure the Tuscany environment to run them (http://svn.apache.org/repos/asf/tuscany/otest/) as follows:

README
build.xml                    - Ant utility script
pom.xml
sca-assembly                 - Generated automatically by svn externals when you check this directory out
sca-java-caa                 - Generated automatically by svn externals when you check this directory out
sca-java-ci                  - Generated automatically by svn externals when you check this directory out
sca-policy                   - Generated automatically by svn externals when you check this 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

SCA Java Modules

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.

binding
databinding
implementation
interface
policy

As you can see SCA extensions relate to the extensible parts of the SCA composite file. For example, if you want to use <binding.jms/> 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.
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 "generally" 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.

Runtime Building Blocks

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).

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.

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

Tuscany Core

OSGi and JSE

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.

Runtime Extensibility

Runtime Modularity

Tuscany SPI

SCA Extensions

Tuscany API

Tuscany Hosting

Runtime Features

Domain and Nodes

Runtime Lifecycle

Read

Resolve

Build

Activate

Start

Stop