Panel |
---|
borderColor | #6699ff |
---|
bgColor | #ffffff |
---|
titleBGColor | #D5EFFF |
---|
title | Apache Tuscany SCA Java Architecture |
---|
borderStyle | solid |
---|
|
This page is work in progress. Thanks for your contribution At the moment we are pulling different pieces of information in one place and then we'll decide on how to organize the information.
|
Anchor |
---|
| Architecture Overview |
---|
| Architecture Overview |
---|
|
Architecture OverviewThe SCA Java runtime is composed of a kernel and extensions. The kernel is essentially a multi-VM wiring engine that connects components together using the principles of Dependency Injection, or Inversion of Control.
Anchor |
---|
| Kernel Definition |
---|
| Kernel Definition |
---|
|
KernelThe kernel is designed to be simple and limited in its capabilities: it wires functional units together. Capabilities such as service discovery, reliability, support for transport protocols, etc. are provided through extensions. The kernel extension model is based on the SCA 1.0 Java programming and assembly model. In otherwords, the kernel uses SCA to bootstrap itself. The mechanics of how this is done are described in detail elsewhere in Kernel Architecture Guide.
The kernel is divided into a number of modules, : api, host_api, spi and core. The api module defines Tuscany proprietary programming model annotations and APIs. The host_api module defines APIs for interacting with the kernel. The spi module defines extension points and abstract helper classes. The core module contains the kernel implementation.
...
Anchor |
---|
| Extension Definition |
---|
| Extension Definition |
---|
|
ExtensionExtensions enhance the kernel with specific sets of functionality. Extension types are not fixed and the kernel is designed to be as flexible as possible by providing an open-ended extension model. From the kernel perspective, extensions are just a set of SCA components. However, there are a number of known extension types defined by the spi module, including:
- Component implementation types, e.g. Spring, Groovy, and JavaScript
- Binding types, e.g. Axis, CXF, AMQP, ActiveMQ, JXTA
- DataBinding types, e.g. JAXB, SDO, XmlBeans
...
More detail can be found in the Extensions Guide section, but a few high-level best practices for designing extensions are listed here:
- Make sure you are familiar with SCA 1.0 Assembly and the SCA Java 1.0 programming model. Specifications can be found at www.osoa.org.
- Never reference any classes in core. These classes are implementation-specific and subject to change; they are not part of the public SPI contract.
- Use autowire when assembling extension components.
- Do not mess with classloaders such as setting the current context classloader unless it is absolutely necessary, i.e. a library used by an extension makes assumptions about context classloaders. Ideally the library can be refactored to not make these assumptions. If not, make sure the extension properly resets the current context classloader.
- Preferrably use EasyMock for mocking kernel functionality during extension unit testing.
- Use the Tuscany iTest Plugin Maven+Plugins for integration testing the extension.
- Preferrably use EasyMock for mocking kernel functionality during extension unit testing.
.
Anchor |
---|
| Runtime Definition |
---|
| Runtime Definition |
---|
|
RuntimeThe kernel is designed to be embedded in, or provisioned to, a number of different host environments. For example, the kernel may be provisioned to an OSGi container, a standalone runtime, a servlet engine, or JEE application server. There is even a Maven runtime that embeds kernel for integration testing. Runtime capabilities may vary based on the host environment.
Data Binding Not sure if this belongs to this page or not
Data provides transparent data mapping between different types of data that can be exchanged between caller of a service and the service itself given the format of the data that will be supplied by the client. Data Mediator will do this transformation given the following information:
- format of the data that can be consumed by the service
- format of the data that will be sent by the client
You can find more detailed information about databinding at this link
...