You should be able to just use the OSGi configuration admin service for this.
http://www.osgi.org/javadoc/r4v42/org/osgi/service/cm/ConfigurationAdmin.html

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.

Christian

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
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to