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();
ServicePoint existingPoint = (ServicePoint) _servicePoints.get(pointId);
if (existingPoint != null)
{
_errorHandler.error(_log, ImplMessages.duplicateExtensionPointId(
pointId,
existingPoint), sd.getLocation(), null);
continue;
}
if (_log.isDebugEnabled())
_log.debug("Creating service 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(findSchema(sd.getParametersSchema(), module, sd
.getParametersSchemaId(), point.getLocation()));
point.setParametersCount(sd.getParametersCount());
point.setVisibility(sd.getVisibility());
point.setShutdownCoordinator(_shutdownCoordinator);
infrastructure.addServicePoint(point);