Hi Christian,

It’s the case by default. It’s used in Decanter for instance.

If you have a component like:

@Component(name = "foo.bar")

You can have etc/foo.bar.cfg.

Then you get the properties in the component context (in the activate method).

Regards
JB

> Le 4 juin 2020 à 14:38, Christian Lutz <christianl...@kreeloo.de> a écrit :
> 
> Hello,
> 
> is it possible with karaf (4.1.x or 4.2.x) to use a configuration file with 
> an ObjectClassDefinition?
> 
> E.g. I have a simple ObjectClassDefinition with one boolean method. I set the 
> pid property to de.xy
> 
> My idea was that if I want to change the default value all I need to do is to 
> create a de.xy.cfg file in karaf /cfg set the boolean value to false and 
> during the component active the value from the config file will be used 
> instead of the default value. 
> 
> I found some tutorials of how to use the objectclassdefinition itself. But I 
> didnt find anything about how I am able to wire this with the karaf 
> Configuration Admin Service. 
> 
> Kind regards
> Christian 

Reply via email to