if (event.getType() == ConfigurationEvent.CM_LOCATION_CHANGED) {
latch.countDown();
}
// when we update the configuration, BP container will be reloaded as well
// hoping that we get the event after *second* restart, let's register the listener
answer.registerService(BlueprintListener.class, new BlueprintListener() {
@Override
public void blueprintEvent(BlueprintEvent event) {
if (event.getType() == BlueprintEvent.CREATED && event.getBundle().getSymbolicName().equals(symbolicName)) {
latch.countDown();
}