(3rd May 2007) This pages and the pages hung off it describe the creation of the module which supports the Spring Component Type that I am working on for a demo. This might be useful to anyone looking to build their own Component Type implementation.
Sequence
Order |
Work Item |
Comment |
---|---|---|
0 |
implementation-spring module created |
|
1 |
Created ModuleActivator file |
|
2 |
Create SpringModuleActivator class |
|
3 |
Create SpringArtifactProcessor class |
Reads the implementation.spring xml |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ModuleActivator file
Placed into the resources/META-INF/services directory:
# Implementation class for the ExtensionActivator org.apache.tuscany.implementation.script.ScriptModuleActivator
SpringModuleActivator class
Constructor
Creates resources used by other parts of the Module implementation:
- AssemblyFactory
- JavaInterfaceFactory
- PolicyFactory
start()
Takes an ExtensionPointRegistry as input parameter, which provides access to configuration of the core.
- Creates a SpringArtifactProcessor and adds to the registry StAXArtifactProcessors
- Creates a SpringImplementationProviderFactory and adds to the registry ProviderFactories
Creates a series of artifacts that are required by the SpringArtifactProcessor and SpringImplementationProviderFactory
stop()
Removes the SpringArtifactProcessor from the registry StAXArtifactProcessors
getExtensionPoints()
Returns a very simple DefaultJavaClassIntrospectorExtensionPoint.
Resolution of the ComponentType of Spring application context
ComponentType of the Spring application-context is performed by reading the application-context.xml file and by introspecting the Java beans which it references.