| Summary: | ConfigurationListener.configurationEvent() called twice when a configuration is changed in pickup directory | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | Peter Lauri <peterlauri> | ||||||
| Component: | unknown | Assignee: | Glyn Normington <glyn.normington> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | major | ||||||||
| Priority: | P3 | CC: | glyn.normington, zteve.powell | ||||||
| Version: | 2.1.0.RELEASE | ||||||||
| Target Milestone: | 3.0.0.M01 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Peter Lauri
Created attachment 183483 [details]
Log output when running the attached bundle
Created attachment 183484 [details]
Maven2 project that contains bundle that registeres ConfigurationListener
Tested on Windows and Linux and got same result. Glyn, I've set this assigned, since you are to look at this in this sprint. I'm not at all sure that this isn't 'working as designed'. If the configuration artifact is modified in the pickup directory, then it will trigger a redeploy, and the update will be called for undeploy as well as deploy. It would be really interesting to see what the configuration dictionary contains for these two update calls—my bet is that it is empty(null) on the first update call, and then populated on the second. There appears to be no way of uninstalling a configuration, save that of reporting a null dictionary update to the registered ManagedService. The behaviour is incorrect. Updating the properties file in pickup causes it to be deployed. The install portion of deploy is optimised to do a refresh (expected since the configuration is already deployed) and this causes the configuration to be updated. The start portion of deploy causes the configuration to be updated again. Unlike bundles, where start of an ACTIVE artifact has no effect, start of an ACTIVE configuration artifact produces an extraneous update. The fix is to improve the handling of all install artifacts so that start processing is skipped if the artifact is already ACTIVE. I also added a regression test along similar lines to the testcase you provided so this bug won't accidentally creep back in. Thanks for being observant and bothering to raise this bug. It will benefit others longer term. |