Thank you JB, option 3 seems to me the more inspiring, I'll go through the code of https://github.com/apache/karaf/blob/master/config/src/main/java/org/apache/karaf/config/command/PropSetCommand.java and https://github.com/apache/karaf-cellar/blob/master/config/src/main/java/org/apache/karaf/cellar/config/shell/PropSetCommand.java to understand how it works and see if I can apply it.
Thanks! Cristiano Il giorno gio 26 mag 2016 alle ore 14:47 Jean-Baptiste Onofré < [email protected]> ha scritto: > Hi, > > you can: > 1. Use config.listener and so use regular code > 2. Use the ClusterConfigMBean > 3. Minic PropSetCommand and directly use the clusterMap (a bit harder) > > Regards > JB > > On 05/26/2016 09:22 AM, Cristiano Costantini wrote: > > Hello all, > > > > I want to store a config property using cellar cluster, programmatically > > from within a bundle. > > > > (basically, the bundle in the first node to come up on the cluster does > > some initialization, when the same bundle is started on another node, > > this initialization need not to be repeated and I was thinking to > > implement it by storing a cluster wide config property like > > "myapp.initalized=true") > > > > Could you give me any suggestion on how to implement this? > > > > Thanks, > > Cristiano > > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com >
