kylixs commented on a change in pull request #8455: URL: https://github.com/apache/dubbo/pull/8455#discussion_r687578575
########## File path: dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java ########## @@ -305,143 +353,153 @@ protected synchronized void init() { map.put(methodConfig.getName() + ".retries", "0"); } } - AsyncMethodInfo asyncMethodInfo = AbstractConfig.convertMethodConfig2AsyncInfo(methodConfig); - if (asyncMethodInfo != null) { -// consumerModel.getMethodModel(methodConfig.getName()).addAttribute(ASYNC_KEY, asyncMethodInfo); - attributes.put(methodConfig.getName(), asyncMethodInfo); - } } } - String hostToRegistry = ConfigUtils.getSystemProperty(DUBBO_IP_TO_REGISTRY); - if (StringUtils.isEmpty(hostToRegistry)) { - hostToRegistry = NetUtils.getLocalHost(); - } else if (isInvalidLocalHost(hostToRegistry)) { - throw new IllegalArgumentException( - "Specified invalid registry ip from property:" + DUBBO_IP_TO_REGISTRY + ", value:" + hostToRegistry); - } - map.put(REGISTER_IP_KEY, hostToRegistry); + return map; + } - serviceMetadata.getAttachments().putAll(map); + @SuppressWarnings({"unchecked"}) + private T createProxy(Map<String, String> referenceParameters) { + if (shouldJvmRefer(referenceParameters)) { + createInvokerForLocal(referenceParameters); + } else { + urls.clear(); + if (url != null && url.length() > 0) { + // user specified URL, could be peer-to-peer address, or register center's address. + parseUrl(referenceParameters); + } else { + // if protocols not in jvm checkRegistry + if (!LOCAL_PROTOCOL.equalsIgnoreCase(getProtocol())) { + aggregateUrlFromRegistry(referenceParameters); + } + } + createInvokerForRemote(); + } - ref = createProxy(map); + if (logger.isInfoEnabled()) { + logger.info("Referred dubbo service " + interfaceClass.getName()); Review comment: use unique service name is more explicit. ```java logger.info("Referred dubbo service: " + this.getUniqueServiceName()); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org