cuibobo opened a new issue #9400:
URL: https://github.com/apache/dubbo/issues/9400


    ApplicationConfig application = new ApplicationConfig();
           application.setName(this.applictionName);
           RegistryConfig registry = new RegistryConfig();
           registry.setAddress(this.registryAddress);
           application.setRegistry(registry);
   
           ReferenceConfig<GenericService> reference = new 
ReferenceConfig<GenericService>();
           
           reference.setInterface(context.getInterfaceName());
           reference.setVersion(context.getVersion());
           reference.setGroup(context.getGroup());
           reference.setGeneric(true);
           reference.setApplication(application);
           reference.setRetries(0);
           if (null != context.getInterfaceTimeout()) {
               
reference.setTimeout(Integer.valueOf(context.getInterfaceTimeout().toString()));
           }
           
   //        GenericService genericService = reference.get();
           GenericService genericService = null;
           ReferenceConfigCache referenceConfigCache = 
ReferenceConfigCache.getCache();
           try {
               genericService = referenceConfigCache.get(reference);
               if (Objects.isNull(genericService)) {
                   referenceConfigCache.destroy(reference);
                   logger.error("dubbo genericService has exception!");
               }
           } catch (Exception e) {
               referenceConfigCache.destroy(reference);
               logger.error("dubbo genericService destroy has exception!");
           }
   dubbo 泛化调用时当consumer端服务刚启动时调用某个服务时会报No Provider,注册中心用的是zk。但是一般第二次调用就正常了。
   provider端的服务一直都是正常的并且一直在线的。


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to