[
https://issues.apache.org/jira/browse/FELIX-5238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15471026#comment-15471026
]
Pierre De Rop commented on FELIX-5238:
--------------------------------------
if I remember exactly, the main objection was the following:
Assume you want to deploy in a running framework a new component which has an
optional configuration dependency; and you also want to register in configadmin
a custom configuration for that new component.
So, the objection was (if I remember correctly) that there could be a short
window where the new component may be initialized with the default
configuration, registered in the registry and used by some other components
until the actual configuration is available; and at this point, the new
component could then be dynamically reconfigured while it is already used by
some other services.
Now, I'm not sure but I think that to work around this potential issue, the
configuration can simply be registered before deploying/starting the new
component, which will then be initialized properly with the expected
configuration, and not the default configuration.
If no other people objects, then I think I will commit this soon (but before I
will make sure that when you register a configuration before deploying/starting
a component which has an opt conf dependency, then the component is initialized
with the new configuration, not with the default configuration).
thank you.
/Pierre
> ConfigurationDependency should provide the setRequired() method
> ---------------------------------------------------------------
>
> Key: FELIX-5238
> URL: https://issues.apache.org/jira/browse/FELIX-5238
> Project: Felix
> Issue Type: Improvement
> Components: Dependency Manager
> Affects Versions: dependencymanager-4.3.0
> Reporter: Guillaume Nodet
> Assignee: Pierre De Rop
> Attachments: FELIX-5238.patch,
> OptionalConfigurationDependencyTest.java
>
>
> Even though the default required for configuration is {{true}}, there's no
> reason why it could not be {{false}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)