try {
List<Artifact> unloadedConfigs = new ArrayList<Artifact>(configs);
int unloadedConfigsCount;
do {
unloadedConfigsCount = unloadedConfigs.size();
LinkedHashSet<Artifact> sorted = configurationManager.sort(unloadedConfigs, lifecycleMonitor);
for (Artifact configID : sorted) {
monitor.moduleLoading(configID);
configurationManager.loadConfiguration(configID, lifecycleMonitor);
int configModuleType = configurationManager.getConfiguration(configID).getModuleType().getValue();
unloadedConfigs.remove(configID);