Thread-topic: ConfigurationAdmin - changing the location of a PID
Title: ConfigurationAdmin - changing the location of a PIDHi,
I am using ConfigurationAdmin, and programmatically setting the location of a PID that I am creating. That all works OK, and the getLocation() method returns the correct location for the PID. I change the location of the pid to the location of a bundle that has a ManagedService with the service.pid set to the PID in question.
Bundle A, registers a ManagedService with service.pid=my.pid
Bundle B, creates PID my.pid and sets the Configuration location to the location of Bundle A.
The problem is that the ManagedService never has its updated(Dictionary) method called. Stepping through the code reveals that this is because the ConfigurationImpl class has in internal private variable named boundBundle which is still set to the bundle that created the PID, and the Configuration location is ignored in deciding whether to call ManagedService.updated(Configuration) methods.
Is this as designed? I hope not :) I would have expected that if I created the PID and set its location to that of another bundle, then the ManagedService class in the other bundle would immediately start to have its updated(Configuration) method called whenever the PID was changed.
Don Laidlaw | Sr. Research Engineer | Infor | office: +1 902-576-5185 | mobile: +1 902-401-6771 | don.laidlaw@xxxxxxxxx