Hello. I've found a good solution, I think...
Instead of deploying all my blueprint XML files separately, I build a bundle with all my files. One of them set the "cm:property-placeholder" using a given persistent ID that will be associated with the bundle. Any of the XML files in the OSGI-INF\blueprint folder can access the properties that are shared at the bundle scope. This way, a single blueprint container is created. The properties can be managed now from the web console, and changes are propagated... Nice, no ? Thanks for your help. Ephemeris Lappis Le 31/07/2012 14:41, [email protected] [via ServiceMix] a écrit : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I've checked the OSGi JavaDocs, and I _think_ you may be able to > override the simple behavior programmatically via the method: > > http://www.osgi.org/javadoc/r4v42/org/osgi/service/cm/ConfigurationAdmin.html#createFactoryConfiguration%28java.lang.String,%20java.lang.String%29 > > which allows you to offer not just a PID for the factory to create the > Configuration, but a location for the bundle in which the > ManagedService that is being configured resides. You could use this > several times for each of your bundles. > > But I welcome correction from more serious OSGi-heads! {grin} I may be > misunderstanding the semantics of the spec, and there certainly may be > a more Karaf/SMX-idiomatic way to accomplish this. > > - --- > A. Soroka > Software & Systems Engineering :: Online Library Environment > the University of Virginia Library > > On Jul 26, 2012, at 10:42 AM, Ephemeris Lappis wrote: > > > Hello. > > > > If I'm not wrong, the persistent ID of a managed configuration is > attached > > to the OSGi bundle that declares it. > > > > Indeed, I can declare my properties like that in one bundle : > > > > <cm:property-placeholder > > id="my.properties" > > persistent-id="my.system.application" > > update-strategy="reload" /> > > > > And ServiceMix actually manages the "etc/my.system.application.cfg" > file and > > lets us modify the properties using the configuration view of the web > > console, that is exactly the desired goal. In tehbconsole you can > see the > > relationship between the configuration file and the bundle... > > > > No more bundle can declare a property placeholder with the same > persistent > > id... Thus, the question about a better way to share global or common > > configuration values... > > > > > > > > > > > > -- > > View this message in context: > http://servicemix.396122.n5.nabble.com/Endpoints-URI-and-system-environment-tp5713987p5714004.html > > Sent from the ServiceMix - User mailing list archive at Nabble.com. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: GPGTools - http://gpgtools.org > > iQEcBAEBAgAGBQJQF9IyAAoJEATpPYSyaoIkWoMH/2zWi7bb9HR20edc3t6fZSu5 > X3hs1C9str+GWGc2v1bdCZY43Fsu3GUXV9zGZ6oFuWkblzOJEEBEyeF3KsBA++B/ > +UNvtG2UbKnSSJXoxRZkyP2vtD9Jo4rZDnmO9AEJQWk0O4oATBHG5ZlYR0eCL2uh > 6ha/Pem+83zcY/g/ZTqqQb2MavxabvBnCcIjKBlzwOJHax6RRjTJ/P+jE7EqbpFQ > T7BSTJkgWJ3Z2bC5KNXbkljq677Fm+413NxXPE0zpokac6tXoflsYkXmW8+rZuKh > msRrTmhvhndrIT+SY9HoMTSgW4b8S8ACU11NhBMnpj7725oJ1PdO1hMVkILhavM= > =NXNR > -----END PGP SIGNATURE----- > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://servicemix.396122.n5.nabble.com/Endpoints-URI-and-system-environment-tp5713987p5714031.html > > > To unsubscribe from Endpoints URI and system environment, click here > <http://servicemix.396122.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5713987&code=ZXBoZW1lcmlzLmxhcHBpc0BnbWFpbC5jb218NTcxMzk4N3w0OTQyMjM2NDI=>. > NAML > <http://servicemix.396122.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > > -- View this message in context: http://servicemix.396122.n5.nabble.com/Endpoints-URI-and-system-environment-tp5713987p5714049.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
