You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/08/29 08:28:47 UTC

[GitHub] diecui1202 commented on issue #2347: [Dubbo-2233] fix reference config cache issue #2233

diecui1202 commented on issue #2347: [Dubbo-2233] fix reference config cache issue #2233
URL: https://github.com/apache/incubator-dubbo/pull/2347#issuecomment-416870058
 
 
   @YoungHu I try to reproduce the problem with the following client code,
   
   ```java
           ReferenceConfig<DemoService> reference = new ReferenceConfig<>();
           reference.setApplication(new ApplicationConfig("first-dubbo-client"));
           reference.setRegistry(new RegistryConfig("multicast://224.5.6.7:1234"));
           reference.setInterface(DemoService.class);
           System.in.read(); // stop provider before continuing
   
           ReferenceConfigCache cache = ReferenceConfigCache.getCache();
           try {
               DemoService greetingsService = cache.get(reference);
   
               String message = greetingsService.sayHello("dubbo");
               System.out.println(message);
           } catch (Exception e) {
               e.printStackTrace();
           }
   
           System.in.read(); // start provide before continuing
   
           DemoService greetingsService = cache.get(reference);
           // GreetingsService greetingsService = reference.get();
           String message = greetingsService.sayHello("dubbo");
           System.out.println(message);
   ```
   
   With the newest master, it works. That means the second invocation succeed.
   
   Is my client suitable for reproducing the problem ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org