Also can you try get/creating the configuration with the initial location of A (i.e. by calling ConfigurationAdmin.getConfiguration(String pid, String location)). When you open the bug report please let us know if that method also fails for you. Thanks.
[equinox-dev] ConfigurationAdmin - changing the location of a PID
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.