Karaf-4 : ConfigurationAdmin returns Managed Properties as null

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Karaf-4 : ConfigurationAdmin returns Managed Properties as null

sathish_alwar
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
Reply | Threaded
Open this post in threaded view
|

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

Łukasz Dywicki
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 <[hidden email]> 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