private ObjectName locateConfigStore(MBeanServerConnection mbServer, ObjectName storeName) throws Exception {
Set set = mbServer.queryNames(storeName, null);
Iterator i = set.iterator();
if (!i.hasNext()) {
throw new NoSuchStoreException("No ConfigurationStore found matching " + storeName);
}
ObjectName configStore = (ObjectName) i.next();
if (i.hasNext()) {
throw new NoSuchStoreException("Multiple ConfigurationStores found matching " + storeName);
}
return configStore;
}