IntroductionPetals ESB implements a plug-in mechanism to be able to extend it with new features. Some optional features of Petals ESB are developed as extensions: Petals Autoloader, Petals Artifact Repository, Petals WS-API. Two extension natures are supported:
|
Table of contents Contributors
No contributors found for: authors on selected page(s)
|
The mechanisms
Mechanism starting a Petals ESB node
When starting a Petals ESB node, the Fractal composite 'Petals' is initialized and started. It is composed of following Fractal components:
- ConfigurationServiceImpl, that manages the configuration of the Petals ESB node,
- PetalsCompositeControllerImpl, that manages the startup of other Fractal components according to the current configuration.
PetalsCompositeControllerImpl starts, in order:
- the extensions that must be loaded first,
- internal components
- the extensions that must be loaded last.
The Fractal composition is controlled by the Fractal component 'PetalsCompositeControllerImpl'
Mechanism for additional internal component
When Petals ESB starts, the classloader is scanned by the extension manager to search all extensions. When one is found, it is instantiated and started. An extension is found when a Java class implementing the interface org.ow2.petals.microkernel.api.extension.PetalsExtensionController is found.
When a PetalsExtensionController is found, the extension manager ask the extension to create its own Fractal composite/component. Next if the extension is a typed extension (see below), the extension manager registers the new extension to the its associated extension manager.
An extension can be typed to have more interaction with other components. Only one sub-type is supported nowadays:
- InstallationExtension: a such extension interacts with installation and deployment subcomponent, so you install or deploy wiith standard ways and uninstall or undeploy with your extension.
All extensions are unregistered, stopped and freed when the ExtensionManager is stopped.
Mechanism for mutable implementation
When PetalsCompositeControllerImpl starts, for each internal component providing mutable implementation, the classloader is scanned to search the mutable implementation. When one is found, it is instantiated, bound with other internal components and started.
A mutable implementation of an internal component is found when a Java class implementing the interface of the internal component.