final AtomicInteger invocationCount = new AtomicInteger();
final CountDownLatch[] latches = new CountDownLatch[] { new CountDownLatch(1), new CountDownLatch(1) };
final Dictionary[] dictionaries = new Dictionary[2];
// Add a configuration listener
ConfigAdminListener listener = new ConfigAdminListener() {
@Override
public void configurationModified(String pid, Dictionary<String, String> props) {
int index = invocationCount.getAndIncrement();
if (index < 2) {