karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: which API to edit .cfg in Karaf at runtime?
Date Mon, 10 Mar 2014 18:30:01 GMT
You should be able to just use the OSGi configuration admin service for 

Just inject the service into your class, get the configuration by its 
pid (which is the filename without.cfg). Then change properties of the 
Configuration and call update(). This should then also change the files.


On 10.03.2014 18:12, Brock Samson wrote:
> Richard,
> i guess i should have been a bit clearer in my initial post. i already have
> infrastructure in place where my javascript-based ui makes update calls to
> the bundle, so i am not looking for a way to have the ui update .cfg file
> directly. rather, i would like the bundle in question to update its own .cfg
> file, which is why i am looking for a straightforward way to accomplish
> this. is the jmx approach it?
> thanks!
> --
> View this message in context: http://karaf.922171.n3.nabble.com/which-API-to-edit-cfg-in-Karaf-at-runtime-tp4032135p4032159.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Christian Schneider

Open Source Architect

View raw message