[ 
https://issues.apache.org/jira/browse/KARAF-4829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15948495#comment-15948495
 ] 

Guillaume Nodet edited comment on KARAF-4829 at 3/30/17 6:39 AM:
-----------------------------------------------------------------

I'm not sure that the original problem is still valid.
I've done a simple test with 4.1.x:
  * start the minimal configuration
  * verify the {{etc/org.apache.felix.eventadmin.impl.EventAdmin.cfg}} file 
does *not* exist
  * run {{features:install eventadmin}}
  * verify the {{etc/org.apache.felix.eventadmin.impl.EventAdmin.cfg}} file 
does *now* exist

So the workaround is not to use <configfile> but rather <config>.  This means 
that the config has to be embedded in the feature description though.  One 
could raise a JIRA to provide a {{location}} attribute so that the 
configuration can be downloaded instead of being embedded if that is necessary.


was (Author: gnt):
I'm not sure that the original problem is still valid.
I've done a simple test with 4.1.x:
  * start the minimal configuration
  * verify the {{etc/org.apache.felix.eventadmin.impl.EventAdmin.cfg}} file 
does *not* exist
  * run {{features:install eventadmin}}
  * verify the {{etc/org.apache.felix.eventadmin.impl.EventAdmin.cfg}} file 
does *now* exist

> Make sure configFile in features makes config available early
> -------------------------------------------------------------
>
>                 Key: KARAF-4829
>                 URL: https://issues.apache.org/jira/browse/KARAF-4829
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-config
>    Affects Versions: 4.0.7
>            Reporter: Christian Schneider
>            Assignee: Christian Schneider
>             Fix For: 4.2.0
>
>
> We currently have the config and configFile elements in feature files.
> Config writes the given entries to ConfigAdmin while configFile writes a file.
> So configFile is needed if the user should get a nice file to edit. The 
> problem with configFile is that ConfigurationAdmin reads the files 
> asyncronously. So bundles of the feature might already be started at the time 
> the config is written.
> So bundles might need to restart or if they only process the config once are 
> in a kind of invalid state that does not relfect the config from the feature.
> So I propose to also write the config to ConfigAdmin if configFile is used. 
> This should allow the bundles to come up in the correct state from the start.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to