List services = md.getServicePoints();
int count = size(services);
for (int i = 0; i < count; i++)
{
ServicePointDescriptor sd = (ServicePointDescriptor) services.get(i);
String pointId = moduleId + "." + sd.getId();
if (LOG.isDebugEnabled())
LOG.debug("Creating service extension point: " + pointId);
// Choose which class to instantiate based on
// whether the service is create-on-first-reference
// or create-on-first-use (deferred).
ServicePointImpl point = new ServicePointImpl();
point.setExtensionPointId(pointId);
point.setLocation(sd.getLocation());
point.setModule(module);
point.setServiceInterfaceName(sd.getInterfaceClassName());
point.setParametersSchema(sd.getParametersSchema());
point.setShutdownCoordinator(_shutdownCoordinator);
registry.addServicePoint(point);