[
https://issues.apache.org/jira/browse/SLING-4154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14216249#comment-14216249
]
Marius Petria commented on SLING-4154:
--------------------------------------
Hi [~cziegeler],
Your proposal is very similar to what I proposed above with the main difference
that you prefer using a ResourceProvider while I proposed a jcr representation
of configs. Both proposals share the fact that a json is translated in a set of
OSGI configs (to make the ownership work we can use a you suggest an OWNER
property that stores the id of the OWNER).
I will comment first on the common thing. Generating the set of OSGI configs
for a json of agents settings is more standard from the point of view of
component management. In my opinion it is more error prone because of
asyncronicity. However, I understand that using the standard injection features
of OSGI offer a cleaner framework so I am OK with that.
The difference between proposals is that I am proposing to treat the "agent
settings" (the single file for configuration) as a different persistent entity
than the underlying osgi configs. I think that helps a lot with points 2 and 4
of my previous post and also with SLING-3837. You are saying that introduces a
synchronization problem, but that is not too big in my opinion. First, the osgi
configs that are created from "agent settings" will not be persisted in JCR
(there is a property to skip that). Second, they will be created at instance
startup and deleted at instance shutdown. Hence they are just used to ease
component creation. If a config is edited in configMgr and goes out of sync the
change will be active just for that run, the persistent settings are actually
stored in "agent settings".
> 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)