for (Enumeration e = currentApplications.objectEnumerator(); e.hasMoreElements(); ) {
aConfig.removeApplication_W((MApplication) e.nextElement());
}
// Look through the array of instances, and see if we need to add/remove any - configure the rest
NSMutableArray currentInstances = new NSMutableArray(aConfig.instanceArray());
if (instanceArray != null) {
for (Enumeration e = instanceArray.objectEnumerator(); e.hasMoreElements(); ) {
NSDictionary anInst = (NSDictionary) e.nextElement();
String hostName = (String) anInst.valueForKey("hostName");
Integer port = (Integer) anInst.valueForKey("port");