[
https://issues.apache.org/jira/browse/SLING-4154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14208019#comment-14208019
]
Carsten Ziegeler commented on SLING-4154:
-----------------------------------------
I seriously think that there should only be one way to manage these components
and that's OSGi and therefore these things should be configured through OSGi
configurations and not resources. Right now, it's confusing who is managing
which component and how it ended up there etc.
And if you go the OSGi way, you don'T need an explicit factory interface, this
can all be done internally and the final Agent service etc. is registered in
the service registry. And custom implementations are registered there as well
base on OSGi configs.
This avoids the confusing generic interfaces all together.
However, if it's absolutely not possible to use OSGi configs, then
a) these things need to be renamed as they are not really components to make
the distinction clear
b) there should be a uniform way to create / configure them
c) don't use generic interfaces, use an AgentFactory etc.
> Discuss distribution components creation and configuration
> -----------------------------------------------------------
>
> Key: SLING-4154
> URL: https://issues.apache.org/jira/browse/SLING-4154
> Project: Sling
> Issue Type: Task
> Components: Distribution
> Reporter: Marius Petria
> Fix For: Content Distribution 0.2.0
>
>
> Distribution has one main component (agent) and several secondary components
> (triggers, exporters and importers).
> These can be created as java objects using a DistributionComponentFactory.
> The core framework provides a DefaultDistributionComponentFactory that will
> create the components implemented in the core but a client can define its own
> components and factory and the default component factory will use those to
> create a component it does not know of.
> The core framework also provides two ways of registering such a java object
> as an OSGI service:
> 1. using osgi configs, the osgi properties are parsed and passed to the
> factory, a component is created and registered
> (GenericDistributionComponentFactory)
> 2. resource configs, the properties of a resource are parsed and passed to
> the factory, a component is created and registered
> (ResourceBasedDistributionComponentFactory)
> Components registered as OSGI services are available as resources via
> OsgiServicePropertiesResourceProvider.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)