Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Adding a New

...

Implementation Type

(3rd May 2007) I wanted to get the Spring and BPEL component implementation types running with the new Tuscany Java core.  This page and those hung off it are my ramblings as I go through the process of building the code for these component implementation types.  I hope that these will help anyone else who wants to venture down the path of adding a component an implementation type.  Beware that I make no claims as to great insight or special knowledge - and I am sure that there will be things that I have not tackled.

Associated with this general page is a set of pages dedicated to Adding the Spring Component Implementation Type where specifics relating to the Spring implementation are described.

Basic Information about code for

...

an Implementation Type 

To create a Module which supports a Component an Implementation Type, you need to implement a series of interfaces to the Tuscany Core, plus a set of related files which declare your Module to the core:

  • xxxModuleActivator class, which implements the ModuleActivator interface
  • ModuleActivator file, which identifies your code to the core as providing an implementation type
  • xxxArtifactProcessor class, which processes the XML for an implementation type
  • xxxImplementation class, which represents a runtime instance of the implementation type

How does a

...

Implementation Type Module declare the XML that it handles?

For a Component an Implementation Type module, it is going to handle the XML <implementation.xxx.../>, which is a child of a <component.../> element in the SCDL.

...

TODO: Get an answer to this question.... 

xxxModuleActivator class

Called when the Tuscany core is loading, starting and stopping the Module which implements the component type.

...

  • Registration of xxxArtifactProcessor, which handles the <implementation.xxx..../> XML
  • Registration of xxxComponentBuilder, which builds a component of the type handled by the module
  • Registration of xxxPropertyValueObjectFactory

The ModuleActivator file 

This must be placed into the location

...

Code Block
# Implementation class for the ExtensionActivator for module Foo
org.apache.tuscany.implementation.foo.FooModuleActivator

The xxxArtifactProcessor class

This class is called to deal with the XML in the composite SCDL files which relates to the implementation type - ie. <implementation.xxx.../>

...

One other step that is handled by the xxxArtifactProcessor class is the resolution of the componentType for the component - teasing out its services, references and properties.  This is either done by introspection of the implementation (instance) or via reading a componentType side file. 

xxxImplementation class

The xxxImplementation class represents the implementation instances themselves.

...