-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Closed
Description
private Object getCallProxy() throws Exception {
if (referenceConfig == null) {
throw new IllegalStateException("ReferenceBean is not ready yet, please make sure to call reference interface method after dubbo is started.");
}
//get reference proxy
//Subclasses should synchronize on the given Object if they perform any sort of extended singleton creation phase.
// In particular, subclasses should not have their own mutexes involved in singleton creation, to avoid the potential for deadlocks in lazy-init situations.
//The redundant type cast is to be compatible with earlier than spring-4.2
synchronized (((DefaultSingletonBeanRegistry)getBeanFactory()).getSingletonMutex()) {
return referenceConfig.get();
}
}
在dubbo3.1.5中为啥要加 synchronized ???目的是什么,主要解决什么问题
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done