Antonio David Pérez Morales created STANBOL-1348:
----------------------------------------------------
Summary: Extend current approach to support configuring engines
routes
Key: STANBOL-1348
URL: https://issues.apache.org/jira/browse/STANBOL-1348
Project: Stanbol
Issue Type: Sub-task
Components: Enhancement Engines
Reporter: Antonio David Pérez Morales
In the first integration made by Florent, a default chain (WeightedChain) is
created from the configured Enhancement Engines. A new component for "engine"
protocol is added to Camel Context in order to be used in routes (this
component simply creates producers using the EnhancementEngine class name which
processes the ContentItem).
The Engines are obtained using OSGI reference injection and ordered by
ENHANCEMENT_ENGINE_ORDERING constant.
After that, a route called "default" using direct component of Camel is created
and all the configured Enhancement Engines are added to the route as Producer
("to" method of Java DSL).
This route is then called by CamelJobManager called in turn by the new created
REST endpoint.
We should allow to configure new routes either installing new bundles
containing RouteBuilder objects or putting a route file defined in Spring XML
in some directory in order to be loaded (updated or deleted) by OSGI Camel
Context.
For the first case, we could provide a maven archetype to generate all the
skeleton to be filled with the needed dependencies.
For the second case, we should provide a OSGI component using WatchService to
monitor a folder (like OSGI already does for bundles) to load, update and
delete routes when files are placed or removed from that directory.
If necessary, a REST endpoint to receive routes in XML format can also be
developed in order to deploy or remove routes via API calls
--
This message was sent by Atlassian JIRA
(v6.2#6252)