Hi Scott,
I’ve checked the classes and ConfigurationPlugin should be supported by Kura 2.0.2 since it uses Equinox 3.8.1 and the ConfigurationPlugin interface is available.
Also will the Kura ConfigurationService only configure _registered_ OSGi services which implement the "ConfigurableComponent" interface.
The ConfigurationService will only forward data to the ConfigurationAdmin under specific circumstances.
Scott reported that he is able to modify the configuration of the component via web ui. The ConfigurationPlugin implementation, as reported by the javadoc, should be tracked by the ConfigurationAdmin [1]. What the Kura ConfigurationService implementation
does is to manage configurable components configurations and send them to the ConfigurationAdmin using the following lines:
Configuration config =
m_configurationAdmin.getConfiguration(m_servicePidByPid.get(pid),
null);
config.update(CollectionsUtil.mapToDictionary(mergedProperties));
Looking at the ConfigurationImpl code (sorry I was not able to find the code corresponding to the 3.8.1):
public void update(Dictionary<String, ?> properties) throws IOException {
try {
lock();
checkDeleted();
updateDictionary(properties);
changeCount++;
save();
configurationAdminFactory.notifyConfigurationUpdated(this, factoryPid != null);
configurationAdminFactory.dispatchEvent(ConfigurationEvent.CM_UPDATED, factoryPid, pid);
} finally {
unlock();
}
}
the code should perform some updates and saves and, as last operation, dispatch a ConfigurationEvent that you should be able to catch with a ConfigurationListener.
Maybe, could you share with us a mockup of your code, in order to be able together to see what is going on?
Thanks.
Best regards,
Matteo
[2] http://git.eclipse.org/c/equinox/rt.equinox.bundles.git/tree/bundles/org.eclipse.equinox.cm/src/org/eclipse/equinox/internal/cm/ConfigurationImpl.java?id=521596f26e818ea7109cc8c7edba82c2a91030c1&h=R3_4_maintenance
--
Matteo Maiero
Software Engineer
direct:
+39 0433 485 902
EUROTECH
Imagine.Build.Succeed.
HEADQUARTERS
EUROTECH S.p.A.
– Via Fratelli Solari, 3/a | 33020 Amaro UD | Italy | Tel. +39. 0433 485411 | Fax +39. 0433 485499 |
Cap.
Soc. 8.878.946,00 € I.V. | P.IVA / C.F.: IT 01791330309 | REA Udine 196115
www.eurotech.com
____________________________________
Il presente messaggio ed ogni suo allegato sono da intendersi inviati esclusivamente agli effettivi destinatari e potrebbero essere
soggetti a restrizioni legali. Se avete ricevuto questo messaggio per errore vi invitiamo a darne immediata notifica al mittente e cancellarlo dal vostro sistema. Qualsiasi altro uso di questo messaggio da parte vostra e' strettamente proibito.
This e-mail, and
any file attached to it, is meant only for the intended recipient of the transmission and may be a communication privileged by law. If you have received it in error, please notify the sender immediately and delete the original from your system. Any other use
of this e-mail by you is strictly forbidden.
I am not sure of that version of Equinox supports ConfigurationPlugin. IIRC it is Equinox 3.8.
Also will the Kura ConfigurationService only configure _registered_ OSGi services which implement the "ConfigurableComponent" interface.
The ConfigurationService will only forward data to the ConfigurationAdmin under specific circumstances. So it may very well be, that you just don't get an even. Because the event is still being sent by the ConfigurationAdmin and not by the Kura ConfigurationService.
Hope this helps
Jens
_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev
|