You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by sathish_alwar <sa...@gmail.com> on 2018/06/18 21:17:23 UTC

Karaf-4 : ConfigurationAdmin returns Managed Properties as null

We are using Karaf-4 (Opendaylight Nitrogen version).

Our beans implement ManagedService and we register them using blueprint.xml.
We have placed the configuration file (pid) under KARAF_HOME/etc and there
are about 80 config files.
When we install feature (about 200 bundles), we noticed  "updated(Dictionary
properties)" callback method gets called with null properties sometimes. All
bundles in the feature have start level as 80.

All files under KARAF_HOME/etc are static files and they are not generated
dynamically.

Please let us know why "ConfigurationAdmin" calls updated() with null
properties sometimes and how to resolve this.

Does "ConfigurationAdmin" takes more time to scan files, but updated() gets
called before it reads the file (pid).

Thanks



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html

Re: Karaf-4 : ConfigurationAdmin returns Managed Properties as null

Posted by Łukasz Dywicki <lu...@code-house.org>.
Satish,
You will receive null values for ManagedServiceFactory instances once certain configuration gets removed. This is normal situation and your code should handle it.

Files located in etc directory are scanned by Felix Fileinstall which is embedded in Karaf. With such amount of foles you might experience some lag, but it is unlikely that fileinstall will post bogus updates without reason.

One of very few reasons why I was getting NULL values on ManagedService config updates was wrong syntax of configuration files with *.config extension. What are fole extensions yoh are using?

Kind regards,
Łukasz Dywicki
--
Code-House
http://code-house.org

> On 18 Jun 2018, at 23:17, sathish_alwar <sa...@gmail.com> wrote:
> 
> We are using Karaf-4 (Opendaylight Nitrogen version).
> 
> Our beans implement ManagedService and we register them using blueprint.xml.
> We have placed the configuration file (pid) under KARAF_HOME/etc and there
> are about 80 config files.
> When we install feature (about 200 bundles), we noticed  "updated(Dictionary
> properties)" callback method gets called with null properties sometimes. All
> bundles in the feature have start level as 80.
> 
> All files under KARAF_HOME/etc are static files and they are not generated
> dynamically.
> 
> Please let us know why "ConfigurationAdmin" calls updated() with null
> properties sometimes and how to resolve this.
> 
> Does "ConfigurationAdmin" takes more time to scan files, but updated() gets
> called before it reads the file (pid).
> 
> Thanks
> 
> 
> 
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-Dev-f930721.html