[
https://issues.apache.org/jira/browse/SLING-4233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14240878#comment-14240878
]
Felix Meschberger commented on SLING-4233:
------------------------------------------
I agree that storing configuration in two places is not good and leads to sync
issues. For this reason, the single configuration should be the OSGi
configuration managed by Configuration Admin.
I don't think it is a good idea to require repository based configuration and
require DS ComponentFactories. Because we force all extensions to use
Declarative Services and more specifically ComponentFactory. In addition to
implementing a specific interface.
In addition, by implementhing this you are implementing yet another
configuration admin and component management feature.
So, I strongly suggest to close this issue just won't fix.
> Change distribution component creation from osgi config factories to osgi
> component factories
> ---------------------------------------------------------------------------------------------
>
> Key: SLING-4233
> URL: https://issues.apache.org/jira/browse/SLING-4233
> Project: Sling
> Issue Type: Improvement
> Components: Distribution
> Reporter: Marius Petria
> Fix For: Content Distribution 0.2.0
>
>
> In SLING-4154 we introduced the generation of osgi configs from a settings
> resource tree. This approach has the advantage of using osgi target bindings
> but has the disadvantage that it stores the settings in two places (in a
> resource tree e.g. /etc/.../agents and in osgi configs).
> To overcome this we can generate osgi components directly instead of osgi
> configs using the ComponentFactory API [1]. That leads to the following setup.
> 1. Component providers register a component with
> componentFactory=sling.disitribution.importer.remote
> 2. All registered factories starting with sling.distribution are picked up by
> the internal DistributionComponentManager [2]
> 3. The ResourceBasedComponentFactory [3] listens to content changes in the
> resource tree and tries to create the corresponding component using the
> registered factories through [2].
> Note that wiring is still done by osgi as the component factories use target
> reference to bind the needed subcomponents, however the settings are stored
> in the resource tree.
> [1]
> http://www.osgi.org/javadoc/r4v42/org/osgi/service/component/ComponentFactory.html
> [2]
> https://github.com/apache/sling/blob/05575da39d80fc29ebd5cd4c2087933c6a97323d/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/DistributionComponentManager.java
> [3]
> https://github.com/apache/sling/blob/05575da39d80fc29ebd5cd4c2087933c6a97323d/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/component/impl/ResourceBasedDistributionComponentFactory.java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)