[ https://issues.apache.org/jira/browse/SLING-4154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14208178#comment-14208178 ]
Marius Petria commented on SLING-4154: -------------------------------------- bq. Well, my understanding has always been that everything should be configurable through OSGi configurations for this module. That was the initial intent, but then we ended up in the situation of not being able to configure the subcomponents from the osgi config of an agent. That lead to a lot of osgi configs for each component and hence the configuration for an agent was split in around 5-7 configs. bq. SLING-3837 can be done with custom resource providers that map OSGi configurations into the resource tree. Yes but that leads to a very unnatural setting. First we need to have the publish configs in the ConfigurationAdmin even if there is no agent present. This is already a big signal that we are using osgi configs in a wrong way. Then we had to invent a new serialization format to serialize "virtual resources". bq. ResourceBasedDistributionComponentFactory that one is only registering agents This can easily be done to register all components. In particular you do not need components to be registered as osgi services unless you want to address them independently. For example you would register an importer that you want to access via HTTP, but not one that is used by an agent internally. > 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)