Skip to content

Commit

Permalink
Feat/update dubbo (sofastack#824)
Browse files Browse the repository at this point in the history
* chore:update dubbo version 2.8.4

* chore:update dubbo version 2.6.7

* feat:solve the check registry of dubbo
  • Loading branch information
leizhiyuan authored Dec 23, 2019
1 parent c4c4b32 commit 4166ae2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
8 changes: 6 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<jetty.version>7.5.4.v20111024</jetty.version>
<curator.version>4.0.1</curator.version>
<opentracing.version>0.22.0</opentracing.version>
<dubbo.version>2.4.10</dubbo.version>
<dubbo.version>2.6.7</dubbo.version>
<nacos.version>1.0.0</nacos.version>
<sofa.registry.version>5.2.0</sofa.registry.version>
<!-- serialization -->
Expand Down Expand Up @@ -128,7 +128,7 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down Expand Up @@ -316,6 +316,10 @@
<artifactId>spring</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
<exclusion>
<artifactId>netty</artifactId>
<groupId>org.jboss.netty</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
4 changes: 4 additions & 0 deletions extension-impl/bootstrap-dubbo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public static void copyRegistries(com.alipay.sofa.rpc.config.AbstractInterfaceCo
dubboRegistryConfigs.add(dubboRegistryConfig);
}
dubboConfig.setRegistries(dubboRegistryConfigs);
} else {
com.alibaba.dubbo.config.RegistryConfig dubboRegistryConfig = new com.alibaba.dubbo.config.RegistryConfig();
dubboRegistryConfig.setAddress(com.alibaba.dubbo.config.RegistryConfig.NO_AVAILABLE);
dubboConfig.setRegistry(dubboRegistryConfig);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
*/
package com.alipay.sofa.rpc.bootstrap.dubbo;

import com.alibaba.dubbo.config.DubboShutdownHook;
import com.alibaba.dubbo.config.ProtocolConfig;
import com.alipay.sofa.rpc.base.Destroyable;
import com.alipay.sofa.rpc.config.RegistryConfig;
import com.alipay.sofa.rpc.config.ServerConfig;
import com.alipay.sofa.rpc.context.RpcRuntimeContext;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

Expand Down Expand Up @@ -61,13 +61,6 @@ public void postDestroy() {
* Destroy all dubbo resources
*/
public static void destroyAll() {
for (Map.Entry<ServerConfig, ProtocolConfig> entry : SERVER_MAP.entrySet()) {
entry.getValue().destory();
}
try {
ProtocolConfig.destroyAll();
} catch (Exception e) {
// NOPMD
}
DubboShutdownHook.getDubboShutdownHook().destroyAll();
}
}

0 comments on commit 4166ae2

Please sign in to comment.