@freeseawind GOT it. 
```
dubbo://172.19.6.139:20881/github.freeseawind.service.DemoService?anyhost=true&application=provider-test&dubbo=2.6.2&generic=false&interface=github.freeseawind.service.DemoService&loadbalance=random&methods=sayHello&pid=3527&side=provider&timeout=5000&timestamp=1536031418472,
dubbo://172.19.6.139:20881/github.freeseawind.service.DemoService?anyhost=true&application=provider-test&dubbo=2.6.2&generic=false&interface=github.freeseawind.service.DemoService&loadbalance=random&methods=sayHello&pid=3527&side=provider&timeout=5000&timestamp=1536031419012
```
notice the last attribute `timestamp` is different, it means that the two 
implementations both trigger the registry operation. So in the zookeeper, you 
can see two providers, while in the spring IOC context, it also has two 
implementations. 

The problem is that Dubbo invoker can not distinguish the two provider because 
their main attributes are the same. While dubbo try to find the ref in the 
Spring IOC context, one of the them is always selected.

I think that it is dubbo user's responsibility to set enough info if two 
providers are exist in the same context.

more details can reference the `com.alibaba.dubbo.config.spring.ServiceBean`. 
It implements `InitializingBean` and `ApplicationListener`, you can know the 
initialization process by debuging into two method `afterPropertiesSet()` and 
`onApplicationEvent()`.

[ Full content available at: 
https://github.com/apache/incubator-dubbo/issues/2419 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to