EndpointReferenceBinder endpointReferenceBinder = registry.getExtensionPoint(EndpointReferenceBinder.class);
DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
// create temporary local registry for all available local endpoints
// TODO - need a better way of getting a local registry
EndpointRegistry registry = domainRegistryFactory.getEndpointRegistry("vm://tmp", "local");
// populate the registry with all the endpoints that are currently present in the model
populateLocalRegistry(composite, registry);
// look at all the endpoint references and try to match them to
// any local endpoints
for (EndpointReference endpointReference : registry.getEndpointReferences()){
endpointReferenceBinder.bindBuildTime(registry, endpointReference);
}
// remove the local registry
domainRegistryFactory.getEndpointRegistries().remove(registry);