pInfo.removePort();
// export this port as a grid service
String portImpl = tMap.getString("cca.portImpl", "None");
if (portImpl.equals("None"))
throw new UnexpectedException("Can't find FQN for provides port: " + portName);
Class portClass = Class.forName(portImpl);
// assumption here that a void constructor exists
Object portInstance = portClass.newInstance();
String intfClassName = tMap.getString("portClass", "None");
UnicastRemoteObject.exportObject((XCATPort) portInstance,
new Class[]{Class.forName(intfClassName)});
// add a reference to the Handle Resolver
String portGSH = pInfo.getProvidesPortHandle();
((XCATPort) portInstance).setGSH(portGSH);
HandleResolver.addReference(portGSH, (XCATPort) portInstance);
// add this provides port to the hashMap
providesPortMap.put(portName, pInfo);
}
}
}
}
}
} catch (Exception e) {
logger.severe("Can't convert state of Services Object to XML", e);
throw new UnexpectedException("Can't convert state of Services Object to XML", e);
}
}