From cfd611dd16fd54fda3fd166264b4ff8bd2ac82d8 Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Wed, 24 Feb 2016 16:53:34 +0800
Subject: [PATCH 01/32] update spring to 4.x and add log4j2 support
---
dubbo-admin/pom.xml | 39 ++-
dubbo-cluster/pom.xml | 3 +-
dubbo-common/pom.xml | 6 +-
.../dubbo/common/logger/LoggerFactory.java | 274 +++++++++---------
.../common/logger/log4j2/Log4j2Logger.java | 100 +++++++
.../logger/log4j2/Log4j2LoggerAdapter.java | 105 +++++++
.../alibaba/dubbo/common/utils/NetUtils.java | 27 +-
dubbo-config/dubbo-config-api/pom.xml | 2 +-
dubbo-config/dubbo-config-spring/pom.xml | 2 +-
dubbo-config/pom.xml | 2 +-
dubbo-container/dubbo-container-api/pom.xml | 2 +-
.../dubbo-container-javaconfig/pom.xml | 2 +-
dubbo-container/dubbo-container-jetty/pom.xml | 2 +-
dubbo-container/dubbo-container-log4j/pom.xml | 2 +-
.../dubbo-container-logback/pom.xml | 2 +-
.../dubbo-container-spring/pom.xml | 2 +-
dubbo-container/pom.xml | 2 +-
dubbo-demo/dubbo-demo-api/pom.xml | 2 +-
dubbo-demo/dubbo-demo-consumer/pom.xml | 6 +-
dubbo-demo/dubbo-demo-provider/pom.xml | 6 +-
...demo-provider.xml => service-provider.xml} | 166 +++++------
.../src/main/webapp/WEB-INF/web.xml | 2 +-
dubbo-demo/pom.xml | 2 +-
dubbo-filter/dubbo-filter-cache/pom.xml | 2 +-
dubbo-filter/dubbo-filter-validation/pom.xml | 2 +-
dubbo-filter/pom.xml | 2 +-
dubbo-monitor/dubbo-monitor-api/pom.xml | 2 +-
dubbo-monitor/dubbo-monitor-default/pom.xml | 2 +-
dubbo-monitor/pom.xml | 2 +-
dubbo-registry/dubbo-registry-api/pom.xml | 2 +-
dubbo-registry/dubbo-registry-default/pom.xml | 2 +-
.../dubbo-registry-multicast/pom.xml | 2 +-
.../registry/multicast/MulticastRegistry.java | 49 ++--
dubbo-registry/dubbo-registry-redis/pom.xml | 2 +-
.../dubbo-registry-zookeeper/pom.xml | 2 +-
dubbo-registry/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-api/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-grizzly/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-http/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-mina/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-netty/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-p2p/pom.xml | 2 +-
.../remoting/p2p/support/MulticastGroup.java | 36 +--
.../dubbo-remoting-zookeeper/pom.xml | 6 +-
.../zkclient/ZkclientZookeeperClient.java | 159 +++++-----
dubbo-remoting/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-api/pom.xml | 2 +-
.../dubbo/rpc/utils/ErrorCodeUtils.java | 25 ++
dubbo-rpc/dubbo-rpc-default/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-hessian/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-http/pom.xml | 2 +-
.../dubbo/rpc/protocol/http/HttpProtocol.java | 91 +++---
dubbo-rpc/dubbo-rpc-injvm/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-memcached/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-redis/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-rest/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-rmi/pom.xml | 2 +-
.../dubbo/rpc/protocol/rmi/RmiProtocol.java | 33 +--
dubbo-rpc/dubbo-rpc-thrift/pom.xml | 93 +++---
.../src/test/java/ClassNameTestDubbo.java | 15 -
.../src/test/java/ClassNameTestThrift.java | 15 +-
.../test/resources/dubbo-demo-consumer.xml | 4 +-
.../test/resources/dubbo-demo-provider.xml | 4 +-
dubbo-rpc/dubbo-rpc-webservice/pom.xml | 2 +-
dubbo-rpc/pom.xml | 2 +-
dubbo-simple/dubbo-monitor-simple/pom.xml | 6 +-
dubbo-simple/dubbo-registry-simple/pom.xml | 2 +-
dubbo-simple/pom.xml | 2 +-
dubbo-test/dubbo-test-benchmark-api/pom.xml | 2 +-
.../dubbo-test-benchmark-client/pom.xml | 6 +-
.../dubbo-test-benchmark-server/pom.xml | 6 +-
dubbo-test/dubbo-test-benchmark/pom.xml | 2 +-
dubbo-test/dubbo-test-compatibility/pom.xml | 2 +-
dubbo-test/dubbo-test-examples/pom.xml | 2 +-
dubbo-test/dubbo-test-integration/pom.xml | 2 +-
dubbo-test/pom.xml | 2 +-
dubbo-tool/dubbo-demo-lite-archetype/pom.xml | 2 +-
.../resources/archetype-resources/pom.xml | 4 +-
.../dubbo-demo-lite-api/pom.xml | 2 +-
.../dubbo-demo-lite-consumer/pom.xml | 2 +-
.../dubbo-demo-lite-provider/pom.xml | 2 +-
dubbo-tool/dubbo-demo-lite/pom.xml | 4 +-
dubbo/pom.xml | 4 +-
hessian-lite/pom.xml | 2 +-
pom.xml | 219 ++++++++------
85 files changed, 963 insertions(+), 660 deletions(-)
create mode 100644 dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2Logger.java
create mode 100644 dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java
rename dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/{dubbo-demo-provider.xml => service-provider.xml} (98%)
create mode 100644 dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/utils/ErrorCodeUtils.java
diff --git a/dubbo-admin/pom.xml b/dubbo-admin/pom.xml
index ec2a30be84a..b3e416412e0 100644
--- a/dubbo-admin/pom.xml
+++ b/dubbo-admin/pom.xml
@@ -19,7 +19,8 @@
com.alibaba
dubbo-parent
- 2.8.4
+
+ 2.8.4a
dubbo-admin
war
@@ -78,7 +79,9 @@
zookeeper
- com.github.sgroschupf
+
+
+ com.101tec
zkclient
@@ -133,19 +136,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.mortbay.jetty
- maven-jetty-plugin
- ${jetty_version}
+ jetty-maven-plugin
+ ${maven-jetty-plugin_version}
- /
+ exit
+ 8080
10
-
-
- 8080
- 60000
-
-
+
+
+ /
+
diff --git a/dubbo-cluster/pom.xml b/dubbo-cluster/pom.xml
index ec6af560cb0..b1f5250e659 100644
--- a/dubbo-cluster/pom.xml
+++ b/dubbo-cluster/pom.xml
@@ -19,7 +19,8 @@
com.alibaba
dubbo-parent
- 2.8.4
+
+ 2.8.4a
dubbo-cluster
jar
diff --git a/dubbo-common/pom.xml b/dubbo-common/pom.xml
index 0d5e9f761de..cbe1c26e6a6 100644
--- a/dubbo-common/pom.xml
+++ b/dubbo-common/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-common
jar
@@ -43,6 +43,10 @@
log4j
log4j
+
+ org.apache.logging.log4j
+ log4j-core
+
org.javassist
javassist
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java
index 3bb6addc10e..008a4862750 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java
@@ -1,154 +1,154 @@
-/*
- * Copyright 1999-2011 Alibaba Group.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+/*
+ * Copyright 1999-2011 Alibaba Group.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package com.alibaba.dubbo.common.logger;
-import java.io.File;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-import com.alibaba.dubbo.common.extension.ExtensionLoader;
-import com.alibaba.dubbo.common.logger.jcl.JclLoggerAdapter;
-import com.alibaba.dubbo.common.logger.jdk.JdkLoggerAdapter;
-import com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter;
-import com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter;
-import com.alibaba.dubbo.common.logger.support.FailsafeLogger;
+import com.alibaba.dubbo.common.extension.ExtensionLoader;
+import com.alibaba.dubbo.common.logger.jcl.JclLoggerAdapter;
+import com.alibaba.dubbo.common.logger.jdk.JdkLoggerAdapter;
+import com.alibaba.dubbo.common.logger.log4j.Log4jLoggerAdapter;
+import com.alibaba.dubbo.common.logger.log4j2.Log4j2LoggerAdapter;
+import com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter;
+import com.alibaba.dubbo.common.logger.support.FailsafeLogger;
+
+import java.io.File;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
/**
* 日志输出器工厂
- *
+ *
* @author william.liangf
*/
public class LoggerFactory {
- private LoggerFactory() {
- }
+ private LoggerFactory() {
+ }
+
+ private static volatile LoggerAdapter LOGGER_ADAPTER;
+
+ private static final ConcurrentMap LOGGERS = new ConcurrentHashMap();
+
+ // 查找常用的日志框架
+ static {
+ String logger = System.getProperty("dubbo.application.logger");
+ if ("slf4j".equals(logger)) {
+ setLoggerAdapter(new Slf4jLoggerAdapter());
+ } else if ("jcl".equals(logger)) {
+ setLoggerAdapter(new JclLoggerAdapter());
+ } else if ("log4j".equals(logger)) {
+ setLoggerAdapter(new Log4jLoggerAdapter());
+ } else if ("log4j2".equals(logger)) {
+ setLoggerAdapter(new Log4j2LoggerAdapter());
+ } else if ("jdk".equals(logger)) {
+ setLoggerAdapter(new JdkLoggerAdapter());
+ } else {
+ try {
+ setLoggerAdapter(new Log4j2LoggerAdapter());
+ } catch (Throwable e1) {
+ try {
+ setLoggerAdapter(new Slf4jLoggerAdapter());
+ } catch (Throwable e2) {
+ try {
+ setLoggerAdapter(new JclLoggerAdapter());
+ } catch (Throwable e3) {
+ setLoggerAdapter(new JdkLoggerAdapter());
+ }
+ }
+ }
+ }
+ }
+
+ public static void setLoggerAdapter(String loggerAdapter) {
+ if (loggerAdapter != null && loggerAdapter.length() > 0) {
+ setLoggerAdapter(ExtensionLoader.getExtensionLoader(LoggerAdapter.class).getExtension(loggerAdapter));
+ }
+ }
- private static volatile LoggerAdapter LOGGER_ADAPTER;
-
- private static final ConcurrentMap LOGGERS = new ConcurrentHashMap();
+ /**
+ * 设置日志输出器供给器
+ *
+ * @param loggerAdapter 日志输出器供给器
+ */
+ public static void setLoggerAdapter(LoggerAdapter loggerAdapter) {
+ if (loggerAdapter != null) {
+ Logger logger = loggerAdapter.getLogger(LoggerFactory.class.getName());
+ logger.info("using logger: " + loggerAdapter.getClass().getName());
+ LoggerFactory.LOGGER_ADAPTER = loggerAdapter;
+ for (Map.Entry entry : LOGGERS.entrySet()) {
+ entry.getValue().setLogger(LOGGER_ADAPTER.getLogger(entry.getKey()));
+ }
+ }
+ }
- // 查找常用的日志框架
- static {
- String logger = System.getProperty("dubbo.application.logger");
- if ("slf4j".equals(logger)) {
- setLoggerAdapter(new Slf4jLoggerAdapter());
- } else if ("jcl".equals(logger)) {
- setLoggerAdapter(new JclLoggerAdapter());
- } else if ("log4j".equals(logger)) {
- setLoggerAdapter(new Log4jLoggerAdapter());
- } else if ("jdk".equals(logger)) {
- setLoggerAdapter(new JdkLoggerAdapter());
- } else {
- try {
- setLoggerAdapter(new Log4jLoggerAdapter());
- } catch (Throwable e1) {
- try {
- setLoggerAdapter(new Slf4jLoggerAdapter());
- } catch (Throwable e2) {
- try {
- setLoggerAdapter(new JclLoggerAdapter());
- } catch (Throwable e3) {
- setLoggerAdapter(new JdkLoggerAdapter());
- }
- }
- }
- }
- }
-
- public static void setLoggerAdapter(String loggerAdapter) {
- if (loggerAdapter != null && loggerAdapter.length() > 0) {
- setLoggerAdapter(ExtensionLoader.getExtensionLoader(LoggerAdapter.class).getExtension(loggerAdapter));
- }
- }
+ /**
+ * 获取日志输出器
+ *
+ * @param key 分类键
+ * @return 日志输出器, 后验条件: 不返回null.
+ */
+ public static Logger getLogger(Class> key) {
+ FailsafeLogger logger = LOGGERS.get(key.getName());
+ if (logger == null) {
+ LOGGERS.putIfAbsent(key.getName(), new FailsafeLogger(LOGGER_ADAPTER.getLogger(key)));
+ logger = LOGGERS.get(key.getName());
+ }
+ return logger;
+ }
- /**
- * 设置日志输出器供给器
- *
- * @param loggerAdapter
- * 日志输出器供给器
- */
- public static void setLoggerAdapter(LoggerAdapter loggerAdapter) {
- if (loggerAdapter != null) {
- Logger logger = loggerAdapter.getLogger(LoggerFactory.class.getName());
- logger.info("using logger: " + loggerAdapter.getClass().getName());
- LoggerFactory.LOGGER_ADAPTER = loggerAdapter;
- for (Map.Entry entry : LOGGERS.entrySet()) {
- entry.getValue().setLogger(LOGGER_ADAPTER.getLogger(entry.getKey()));
- }
- }
- }
+ /**
+ * 获取日志输出器
+ *
+ * @param key 分类键
+ * @return 日志输出器, 后验条件: 不返回null.
+ */
+ public static Logger getLogger(String key) {
+ FailsafeLogger logger = LOGGERS.get(key);
+ if (logger == null) {
+ LOGGERS.putIfAbsent(key, new FailsafeLogger(LOGGER_ADAPTER.getLogger(key)));
+ logger = LOGGERS.get(key);
+ }
+ return logger;
+ }
- /**
- * 获取日志输出器
- *
- * @param key
- * 分类键
- * @return 日志输出器, 后验条件: 不返回null.
- */
- public static Logger getLogger(Class> key) {
- FailsafeLogger logger = LOGGERS.get(key.getName());
- if (logger == null) {
- LOGGERS.putIfAbsent(key.getName(), new FailsafeLogger(LOGGER_ADAPTER.getLogger(key)));
- logger = LOGGERS.get(key.getName());
- }
- return logger;
- }
+ /**
+ * 动态设置输出日志级别
+ *
+ * @param level 日志级别
+ */
+ public static void setLevel(Level level) {
+ LOGGER_ADAPTER.setLevel(level);
+ }
- /**
- * 获取日志输出器
- *
- * @param key
- * 分类键
- * @return 日志输出器, 后验条件: 不返回null.
- */
- public static Logger getLogger(String key) {
- FailsafeLogger logger = LOGGERS.get(key);
- if (logger == null) {
- LOGGERS.putIfAbsent(key, new FailsafeLogger(LOGGER_ADAPTER.getLogger(key)));
- logger = LOGGERS.get(key);
- }
- return logger;
- }
-
- /**
- * 动态设置输出日志级别
- *
- * @param level 日志级别
- */
- public static void setLevel(Level level) {
- LOGGER_ADAPTER.setLevel(level);
- }
+ /**
+ * 获取日志级别
+ *
+ * @return 日志级别
+ */
+ public static Level getLevel() {
+ return LOGGER_ADAPTER.getLevel();
+ }
- /**
- * 获取日志级别
- *
- * @return 日志级别
- */
- public static Level getLevel() {
- return LOGGER_ADAPTER.getLevel();
- }
-
- /**
- * 获取日志文件
- *
- * @return 日志文件
- */
- public static File getFile() {
- return LOGGER_ADAPTER.getFile();
- }
+ /**
+ * 获取日志文件
+ *
+ * @return 日志文件
+ */
+ public static File getFile() {
+ return LOGGER_ADAPTER.getFile();
+ }
}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2Logger.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2Logger.java
new file mode 100644
index 00000000000..636e4f684ef
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2Logger.java
@@ -0,0 +1,100 @@
+
+package com.alibaba.dubbo.common.logger.log4j2;
+
+import com.alibaba.dubbo.common.logger.Logger;
+
+/**
+ * author: yangjunming (http://yjmyzz.cnblogs.com/)
+ * since: 2016-02-24
+ */
+public class Log4j2Logger implements Logger {
+
+ //private static final String FQCN = FailsafeLogger.class.getName();
+
+ private final org.slf4j.Logger logger;
+
+ public Log4j2Logger(org.slf4j.Logger logger) {
+ this.logger = logger;
+ }
+
+ public void trace(String msg) {
+ logger.trace(msg);
+ }
+
+ public void trace(Throwable e) {
+ logger.trace(e == null ? null : e.getMessage());
+ }
+
+ public void trace(String msg, Throwable e) {
+ logger.trace(msg, e);
+ }
+
+ public void debug(String msg) {
+ logger.debug(msg);
+ }
+
+ public void debug(Throwable e) {
+ logger.debug(e == null ? null : e.getMessage());
+ }
+
+ public void debug(String msg, Throwable e) {
+ logger.debug(msg, e);
+ }
+
+ public void info(String msg) {
+ logger.info(msg);
+ }
+
+ public void info(Throwable e) {
+ logger.info(e == null ? null : e.getMessage());
+ }
+
+ public void info(String msg, Throwable e) {
+ logger.info(msg, e);
+ }
+
+ public void warn(String msg) {
+ logger.warn(msg);
+ }
+
+ public void warn(Throwable e) {
+ logger.warn(e == null ? null : e.getMessage());
+ }
+
+ public void warn(String msg, Throwable e) {
+ logger.warn(msg, e);
+ }
+
+ public void error(String msg) {
+ logger.error(msg);
+ }
+
+ public void error(Throwable e) {
+ logger.error(e == null ? null : e.getMessage());
+ }
+
+ public void error(String msg, Throwable e) {
+ logger.error(msg, e);
+ }
+
+ public boolean isTraceEnabled() {
+ return logger.isTraceEnabled();
+ }
+
+ public boolean isDebugEnabled() {
+ return logger.isDebugEnabled();
+ }
+
+ public boolean isInfoEnabled() {
+ return logger.isInfoEnabled();
+ }
+
+ public boolean isWarnEnabled() {
+ return logger.isWarnEnabled();
+ }
+
+ public boolean isErrorEnabled() {
+ return logger.isErrorEnabled();
+ }
+
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java
new file mode 100644
index 00000000000..2d1a014d1c1
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/log4j2/Log4j2LoggerAdapter.java
@@ -0,0 +1,105 @@
+package com.alibaba.dubbo.common.logger.log4j2;
+
+import com.alibaba.dubbo.common.logger.Level;
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerAdapter;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.FileAppender;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Map;
+
+public class Log4j2LoggerAdapter implements LoggerAdapter {
+
+ @SuppressWarnings("unchecked")
+ public Log4j2LoggerAdapter() {
+ try {
+ org.apache.logging.log4j.Logger logger = LogManager.getLogger();
+ if (logger != null) {
+ Map appenderMap =
+ ((org.apache.logging.log4j.core.Logger) logger).getAppenders();
+ for (Map.Entry entry : appenderMap.entrySet()) {
+ if (entry.getValue() instanceof FileAppender) {
+ String filename = ((FileAppender) entry.getValue()).getFileName();
+ file = new File(filename);
+ break;
+ }
+ }
+ }
+ } catch (Throwable t) {
+ }
+ }
+
+ public Logger getLogger(String key) {
+ return new Log4j2Logger(LoggerFactory.getLogger(key));
+ }
+
+ public Logger getLogger(Class> key) {
+ return new Log4j2Logger(LoggerFactory.getLogger(key));
+ }
+
+ private File file;
+
+ public void setLevel(Level level) {
+ LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
+ Configuration config = ctx.getConfiguration();
+ LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
+ loggerConfig.setLevel(toLog4jLevel(level));
+ ctx.updateLoggers();
+ }
+
+ public Level getLevel() {
+ LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
+ Configuration config = ctx.getConfiguration();
+ LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
+ return fromLog4jLevel(loggerConfig.getLevel());
+ }
+
+
+ public File getFile() {
+ return file;
+ }
+
+ public void setFile(File file) {
+ this.file = file;
+ }
+
+
+ public static org.apache.logging.log4j.Level toLog4jLevel(Level level) {
+ if (level == Level.ALL)
+ return org.apache.logging.log4j.Level.ALL;
+ if (level == Level.TRACE)
+ return org.apache.logging.log4j.Level.TRACE;
+ if (level == Level.DEBUG)
+ return org.apache.logging.log4j.Level.DEBUG;
+ if (level == Level.INFO)
+ return org.apache.logging.log4j.Level.INFO;
+ if (level == Level.WARN)
+ return org.apache.logging.log4j.Level.WARN;
+ if (level == Level.ERROR)
+ return org.apache.logging.log4j.Level.ERROR;
+ return org.apache.logging.log4j.Level.OFF;
+ }
+
+ public static Level fromLog4jLevel(org.apache.logging.log4j.Level level) {
+ if (level == org.apache.logging.log4j.Level.ALL)
+ return Level.ALL;
+ if (level == org.apache.logging.log4j.Level.TRACE)
+ return Level.TRACE;
+ if (level == org.apache.logging.log4j.Level.DEBUG)
+ return Level.DEBUG;
+ if (level == org.apache.logging.log4j.Level.INFO)
+ return Level.INFO;
+ if (level == org.apache.logging.log4j.Level.WARN)
+ return Level.WARN;
+ if (level == org.apache.logging.log4j.Level.ERROR)
+ return Level.ERROR;
+ return Level.OFF;
+ }
+
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
index a037544e5ab..cb45dc022c1 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/utils/NetUtils.java
@@ -15,21 +15,17 @@
*/
package com.alibaba.dubbo.common.utils;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+
import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.NetworkInterface;
-import java.net.ServerSocket;
-import java.net.UnknownHostException;
+import java.net.*;
import java.util.Enumeration;
import java.util.Map;
import java.util.Random;
import java.util.regex.Pattern;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.logger.Logger;
-import com.alibaba.dubbo.common.logger.LoggerFactory;
-
/**
* IP and Port Helper for RPC,
*
@@ -133,6 +129,19 @@ public static boolean isValidLocalHost(String host) {
return ! isInvalidLocalHost(host);
}
+
+ public static boolean isMulticastAddress(String ip) {
+ int i = ip.indexOf('.');
+ if (i > 0) {
+ String prefix = ip.substring(0, i);
+ if (StringUtils.isInteger(prefix)) {
+ int p = Integer.parseInt(prefix);
+ return p >= 224 && p <= 239;
+ }
+ }
+ return false;
+ }
+
public static InetSocketAddress getLocalSocketAddress(String host, int port) {
return isInvalidLocalHost(host) ?
new InetSocketAddress(port) : new InetSocketAddress(host, port);
diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml
index d1f6a82c9c8..9c9feb597a6 100644
--- a/dubbo-config/dubbo-config-api/pom.xml
+++ b/dubbo-config/dubbo-config-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-config
- 2.8.4
+ 2.8.4a
dubbo-config-api
jar
diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml
index 9732dff29d6..cae37500984 100644
--- a/dubbo-config/dubbo-config-spring/pom.xml
+++ b/dubbo-config/dubbo-config-spring/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-config
- 2.8.4
+ 2.8.4a
dubbo-config-spring
jar
diff --git a/dubbo-config/pom.xml b/dubbo-config/pom.xml
index 925195632b1..1bb9edbe562 100644
--- a/dubbo-config/pom.xml
+++ b/dubbo-config/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-config
pom
diff --git a/dubbo-container/dubbo-container-api/pom.xml b/dubbo-container/dubbo-container-api/pom.xml
index 3cb4bda94c4..bcb5e3b1483 100644
--- a/dubbo-container/dubbo-container-api/pom.xml
+++ b/dubbo-container/dubbo-container-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4
+ 2.8.4a
dubbo-container-api
jar
diff --git a/dubbo-container/dubbo-container-javaconfig/pom.xml b/dubbo-container/dubbo-container-javaconfig/pom.xml
index 3cc3985b60e..a9e5a6e32ca 100644
--- a/dubbo-container/dubbo-container-javaconfig/pom.xml
+++ b/dubbo-container/dubbo-container-javaconfig/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4
+ 2.8.4a
dubbo-container-javaconfig
jar
diff --git a/dubbo-container/dubbo-container-jetty/pom.xml b/dubbo-container/dubbo-container-jetty/pom.xml
index 3fd180fb91a..fbc042b86da 100644
--- a/dubbo-container/dubbo-container-jetty/pom.xml
+++ b/dubbo-container/dubbo-container-jetty/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4
+ 2.8.4a
dubbo-container-jetty
jar
diff --git a/dubbo-container/dubbo-container-log4j/pom.xml b/dubbo-container/dubbo-container-log4j/pom.xml
index be4637f3263..04ca6352033 100644
--- a/dubbo-container/dubbo-container-log4j/pom.xml
+++ b/dubbo-container/dubbo-container-log4j/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4
+ 2.8.4a
dubbo-container-log4j
jar
diff --git a/dubbo-container/dubbo-container-logback/pom.xml b/dubbo-container/dubbo-container-logback/pom.xml
index a123294937e..a64811a669a 100644
--- a/dubbo-container/dubbo-container-logback/pom.xml
+++ b/dubbo-container/dubbo-container-logback/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4
+ 2.8.4a
dubbo-container-logback
jar
diff --git a/dubbo-container/dubbo-container-spring/pom.xml b/dubbo-container/dubbo-container-spring/pom.xml
index 9564561a899..eea0dcc9235 100644
--- a/dubbo-container/dubbo-container-spring/pom.xml
+++ b/dubbo-container/dubbo-container-spring/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4
+ 2.8.4a
dubbo-container-spring
jar
diff --git a/dubbo-container/pom.xml b/dubbo-container/pom.xml
index b277ac00762..9ee40407c06 100644
--- a/dubbo-container/pom.xml
+++ b/dubbo-container/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-container
pom
diff --git a/dubbo-demo/dubbo-demo-api/pom.xml b/dubbo-demo/dubbo-demo-api/pom.xml
index a311efe313b..f95d6ae7a2c 100644
--- a/dubbo-demo/dubbo-demo-api/pom.xml
+++ b/dubbo-demo/dubbo-demo-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo
- 2.8.4
+ 2.8.4a
dubbo-demo-api
jar
diff --git a/dubbo-demo/dubbo-demo-consumer/pom.xml b/dubbo-demo/dubbo-demo-consumer/pom.xml
index 3e2427967bb..1e57feafec9 100644
--- a/dubbo-demo/dubbo-demo-consumer/pom.xml
+++ b/dubbo-demo/dubbo-demo-consumer/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo
- 2.8.4
+ 2.8.4a
dubbo-demo-consumer
jar
@@ -76,7 +76,9 @@
zookeeper
- com.github.sgroschupf
+
+
+ com.101tec
zkclient
diff --git a/dubbo-demo/dubbo-demo-provider/pom.xml b/dubbo-demo/dubbo-demo-provider/pom.xml
index 1d6192f7aec..79cb9194ed0 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo
- 2.8.4
+ 2.8.4a
dubbo-demo-provider
war
@@ -76,7 +76,9 @@
zookeeper
- com.github.sgroschupf
+
+
+ com.101tec
zkclient
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
similarity index 98%
rename from dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
rename to dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
index 265645ab00b..4c423e151fa 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
@@ -1,84 +1,84 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml b/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml
index 9a355c15ffc..1b931d7ee00 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml
+++ b/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml
@@ -5,7 +5,7 @@
contextConfigLocation
- /WEB-INF/classes/META-INF/spring/dubbo-demo-provider.xml
+ /WEB-INF/classes/META-INF/spring/service-provider.xml
diff --git a/dubbo-demo/pom.xml b/dubbo-demo/pom.xml
index 4d77e14ec9a..fcdd71e8998 100644
--- a/dubbo-demo/pom.xml
+++ b/dubbo-demo/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-demo
pom
diff --git a/dubbo-filter/dubbo-filter-cache/pom.xml b/dubbo-filter/dubbo-filter-cache/pom.xml
index 8431bef623d..7f951e555fa 100644
--- a/dubbo-filter/dubbo-filter-cache/pom.xml
+++ b/dubbo-filter/dubbo-filter-cache/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-filter
- 2.8.4
+ 2.8.4a
dubbo-filter-cache
jar
diff --git a/dubbo-filter/dubbo-filter-validation/pom.xml b/dubbo-filter/dubbo-filter-validation/pom.xml
index d3d9cc12134..c918e55e158 100644
--- a/dubbo-filter/dubbo-filter-validation/pom.xml
+++ b/dubbo-filter/dubbo-filter-validation/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-filter
- 2.8.4
+ 2.8.4a
dubbo-filter-validation
jar
diff --git a/dubbo-filter/pom.xml b/dubbo-filter/pom.xml
index 86e2ef12fbf..88e1835f765 100644
--- a/dubbo-filter/pom.xml
+++ b/dubbo-filter/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-filter
pom
diff --git a/dubbo-monitor/dubbo-monitor-api/pom.xml b/dubbo-monitor/dubbo-monitor-api/pom.xml
index e654f038a54..f8ec16ebc59 100644
--- a/dubbo-monitor/dubbo-monitor-api/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-monitor
- 2.8.4
+ 2.8.4a
dubbo-monitor-api
jar
diff --git a/dubbo-monitor/dubbo-monitor-default/pom.xml b/dubbo-monitor/dubbo-monitor-default/pom.xml
index 957fda3e422..313aaf0930d 100644
--- a/dubbo-monitor/dubbo-monitor-default/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-default/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-monitor
- 2.8.4
+ 2.8.4a
dubbo-monitor-default
jar
diff --git a/dubbo-monitor/pom.xml b/dubbo-monitor/pom.xml
index 5061c3f5606..df25f820de1 100644
--- a/dubbo-monitor/pom.xml
+++ b/dubbo-monitor/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-monitor
pom
diff --git a/dubbo-registry/dubbo-registry-api/pom.xml b/dubbo-registry/dubbo-registry-api/pom.xml
index 25572a8b656..fe9110c6435 100644
--- a/dubbo-registry/dubbo-registry-api/pom.xml
+++ b/dubbo-registry/dubbo-registry-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4
+ 2.8.4a
dubbo-registry-api
jar
diff --git a/dubbo-registry/dubbo-registry-default/pom.xml b/dubbo-registry/dubbo-registry-default/pom.xml
index 2ee2515bed9..f0f2588e490 100644
--- a/dubbo-registry/dubbo-registry-default/pom.xml
+++ b/dubbo-registry/dubbo-registry-default/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4
+ 2.8.4a
dubbo-registry-default
jar
diff --git a/dubbo-registry/dubbo-registry-multicast/pom.xml b/dubbo-registry/dubbo-registry-multicast/pom.xml
index 478d4fb67b7..88415cff157 100644
--- a/dubbo-registry/dubbo-registry-multicast/pom.xml
+++ b/dubbo-registry/dubbo-registry-multicast/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4
+ 2.8.4a
dubbo-registry-multicast
jar
diff --git a/dubbo-registry/dubbo-registry-multicast/src/main/java/com/alibaba/dubbo/registry/multicast/MulticastRegistry.java b/dubbo-registry/dubbo-registry-multicast/src/main/java/com/alibaba/dubbo/registry/multicast/MulticastRegistry.java
index 5575e84e4f9..0fd8a3f8ac0 100644
--- a/dubbo-registry/dubbo-registry-multicast/src/main/java/com/alibaba/dubbo/registry/multicast/MulticastRegistry.java
+++ b/dubbo-registry/dubbo-registry-multicast/src/main/java/com/alibaba/dubbo/registry/multicast/MulticastRegistry.java
@@ -15,25 +15,6 @@
*/
package com.alibaba.dubbo.registry.multicast;
-import java.io.IOException;
-import java.net.DatagramPacket;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.MulticastSocket;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.logger.Logger;
@@ -41,11 +22,15 @@
import com.alibaba.dubbo.common.utils.ConcurrentHashSet;
import com.alibaba.dubbo.common.utils.NamedThreadFactory;
import com.alibaba.dubbo.common.utils.NetUtils;
-import com.alibaba.dubbo.common.utils.StringUtils;
import com.alibaba.dubbo.common.utils.UrlUtils;
import com.alibaba.dubbo.registry.NotifyListener;
import com.alibaba.dubbo.registry.support.FailbackRegistry;
+import java.io.IOException;
+import java.net.*;
+import java.util.*;
+import java.util.concurrent.*;
+
/**
* MulticastRegistry
*
@@ -79,7 +64,7 @@ public MulticastRegistry(URL url) {
if (url.isAnyHost()) {
throw new IllegalStateException("registry address == null");
}
- if (! isMulticastAddress(url.getHost())) {
+ if (! NetUtils.isMulticastAddress(url.getHost())) {
throw new IllegalArgumentException("Invalid multicast address " + url.getHost() + ", scope: 224.0.0.0 - 239.255.255.255");
}
try {
@@ -131,17 +116,17 @@ public void run() {
}
}
- private static boolean isMulticastAddress(String ip) {
- int i = ip.indexOf('.');
- if (i > 0) {
- String prefix = ip.substring(0, i);
- if (StringUtils.isInteger(prefix)) {
- int p = Integer.parseInt(prefix);
- return p >= 224 && p <= 239;
- }
- }
- return false;
- }
+// private static boolean isMulticastAddress(String ip) {
+// int i = ip.indexOf('.');
+// if (i > 0) {
+// String prefix = ip.substring(0, i);
+// if (StringUtils.isInteger(prefix)) {
+// int p = Integer.parseInt(prefix);
+// return p >= 224 && p <= 239;
+// }
+// }
+// return false;
+// }
private void clean() {
if (admin) {
diff --git a/dubbo-registry/dubbo-registry-redis/pom.xml b/dubbo-registry/dubbo-registry-redis/pom.xml
index 10c9fa26b49..7957606f143 100644
--- a/dubbo-registry/dubbo-registry-redis/pom.xml
+++ b/dubbo-registry/dubbo-registry-redis/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4
+ 2.8.4a
dubbo-registry-redis
jar
diff --git a/dubbo-registry/dubbo-registry-zookeeper/pom.xml b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
index 774d0b73bda..b76bdb6bd56 100644
--- a/dubbo-registry/dubbo-registry-zookeeper/pom.xml
+++ b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4
+ 2.8.4a
dubbo-registry-zookeeper
jar
diff --git a/dubbo-registry/pom.xml b/dubbo-registry/pom.xml
index 4dedf4fc732..efcc5f7a787 100644
--- a/dubbo-registry/pom.xml
+++ b/dubbo-registry/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-registry
pom
diff --git a/dubbo-remoting/dubbo-remoting-api/pom.xml b/dubbo-remoting/dubbo-remoting-api/pom.xml
index c8fe1460033..e101e401e6e 100644
--- a/dubbo-remoting/dubbo-remoting-api/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4
+ 2.8.4a
dubbo-remoting-api
jar
diff --git a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
index ce4b6520072..448caf8ace2 100644
--- a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4
+ 2.8.4a
dubbo-remoting-grizzly
jar
diff --git a/dubbo-remoting/dubbo-remoting-http/pom.xml b/dubbo-remoting/dubbo-remoting-http/pom.xml
index c08a31deb77..ad13e4de826 100644
--- a/dubbo-remoting/dubbo-remoting-http/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-http/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4
+ 2.8.4a
dubbo-remoting-http
jar
diff --git a/dubbo-remoting/dubbo-remoting-mina/pom.xml b/dubbo-remoting/dubbo-remoting-mina/pom.xml
index b3e36966f1a..aaabd46cd02 100644
--- a/dubbo-remoting/dubbo-remoting-mina/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-mina/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4
+ 2.8.4a
dubbo-remoting-mina
jar
diff --git a/dubbo-remoting/dubbo-remoting-netty/pom.xml b/dubbo-remoting/dubbo-remoting-netty/pom.xml
index afe4f789749..bb4405b6250 100644
--- a/dubbo-remoting/dubbo-remoting-netty/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-netty/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4
+ 2.8.4a
dubbo-remoting-netty
jar
diff --git a/dubbo-remoting/dubbo-remoting-p2p/pom.xml b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
index 0dce25f736f..ea68fee293e 100644
--- a/dubbo-remoting/dubbo-remoting-p2p/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4
+ 2.8.4a
dubbo-remoting-p2p
jar
diff --git a/dubbo-remoting/dubbo-remoting-p2p/src/main/java/com/alibaba/dubbo/remoting/p2p/support/MulticastGroup.java b/dubbo-remoting/dubbo-remoting-p2p/src/main/java/com/alibaba/dubbo/remoting/p2p/support/MulticastGroup.java
index beca3ba9c96..d249ec49fe1 100644
--- a/dubbo-remoting/dubbo-remoting-p2p/src/main/java/com/alibaba/dubbo/remoting/p2p/support/MulticastGroup.java
+++ b/dubbo-remoting/dubbo-remoting-p2p/src/main/java/com/alibaba/dubbo/remoting/p2p/support/MulticastGroup.java
@@ -15,18 +15,18 @@
*/
package com.alibaba.dubbo.remoting.p2p.support;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.utils.NetUtils;
+import com.alibaba.dubbo.remoting.ChannelHandler;
+import com.alibaba.dubbo.remoting.RemotingException;
+import com.alibaba.dubbo.remoting.p2p.Peer;
+
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.MulticastSocket;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.utils.StringUtils;
-import com.alibaba.dubbo.remoting.ChannelHandler;
-import com.alibaba.dubbo.remoting.RemotingException;
-import com.alibaba.dubbo.remoting.p2p.Peer;
-
/**
* MulticastGroup
*
@@ -44,7 +44,7 @@ public class MulticastGroup extends AbstractGroup {
public MulticastGroup(URL url) {
super(url);
- if (! isMulticastAddress(url.getHost())) {
+ if (!NetUtils.isMulticastAddress(url.getHost())) {
throw new IllegalArgumentException("Invalid multicast address " + url.getHost() + ", scope: 224.0.0.0 - 239.255.255.255");
}
try {
@@ -73,17 +73,17 @@ public void run() {
}
}
- private static boolean isMulticastAddress(String ip) {
- int i = ip.indexOf('.');
- if (i > 0) {
- String prefix = ip.substring(0, i);
- if (StringUtils.isInteger(prefix)) {
- int p = Integer.parseInt(prefix);
- return p >= 224 && p <= 239;
- }
- }
- return false;
- }
+// private static boolean isMulticastAddress(String ip) {
+// int i = ip.indexOf('.');
+// if (i > 0) {
+// String prefix = ip.substring(0, i);
+// if (StringUtils.isInteger(prefix)) {
+// int p = Integer.parseInt(prefix);
+// return p >= 224 && p <= 239;
+// }
+// }
+// return false;
+// }
private void send(String msg) throws RemotingException {
DatagramPacket hi = new DatagramPacket(msg.getBytes(), msg.length(), mutilcastAddress, mutilcastSocket.getLocalPort());
diff --git a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
index 47520dae0d8..896a825dd72 100644
--- a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4
+ 2.8.4a
dubbo-remoting-zookeeper
jar
@@ -39,7 +39,9 @@
zookeeper
- com.github.sgroschupf
+
+
+ com.101tec
zkclient
diff --git a/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/zkclient/ZkclientZookeeperClient.java b/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/zkclient/ZkclientZookeeperClient.java
index f1f43e6ba68..d025ae6e45d 100644
--- a/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/zkclient/ZkclientZookeeperClient.java
+++ b/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/zkclient/ZkclientZookeeperClient.java
@@ -1,8 +1,10 @@
package com.alibaba.dubbo.remoting.zookeeper.zkclient;
-import java.util.List;
-
import com.alibaba.dubbo.common.Constants;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.remoting.zookeeper.ChildListener;
+import com.alibaba.dubbo.remoting.zookeeper.StateListener;
+import com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient;
import org.I0Itec.zkclient.IZkChildListener;
import org.I0Itec.zkclient.IZkStateListener;
import org.I0Itec.zkclient.ZkClient;
@@ -10,90 +12,95 @@
import org.I0Itec.zkclient.exception.ZkNodeExistsException;
import org.apache.zookeeper.Watcher.Event.KeeperState;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.remoting.zookeeper.ChildListener;
-import com.alibaba.dubbo.remoting.zookeeper.StateListener;
-import com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient;
+import java.util.List;
public class ZkclientZookeeperClient extends AbstractZookeeperClient {
- private final ZkClient client;
+ private final ZkClient client;
- private volatile KeeperState state = KeeperState.SyncConnected;
+ private volatile KeeperState state = KeeperState.SyncConnected;
- public ZkclientZookeeperClient(URL url) {
- super(url);
- client = new ZkClient(
+ public ZkclientZookeeperClient(URL url) {
+ super(url);
+ client = new ZkClient(
url.getBackupAddress(),
url.getParameter(Constants.SESSION_TIMEOUT_KEY, Constants.DEFAULT_SESSION_TIMEOUT),
url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_REGISTRY_CONNECT_TIMEOUT));
- client.subscribeStateChanges(new IZkStateListener() {
- public void handleStateChanged(KeeperState state) throws Exception {
- ZkclientZookeeperClient.this.state = state;
- if (state == KeeperState.Disconnected) {
- stateChanged(StateListener.DISCONNECTED);
- } else if (state == KeeperState.SyncConnected) {
- stateChanged(StateListener.CONNECTED);
- }
- }
- public void handleNewSession() throws Exception {
- stateChanged(StateListener.RECONNECTED);
- }
- });
- }
-
- public void createPersistent(String path) {
- try {
- client.createPersistent(path, true);
- } catch (ZkNodeExistsException e) {
- }
- }
-
- public void createEphemeral(String path) {
- try {
- client.createEphemeral(path);
- } catch (ZkNodeExistsException e) {
- }
- }
-
- public void delete(String path) {
- try {
- client.delete(path);
- } catch (ZkNoNodeException e) {
- }
- }
-
- public List getChildren(String path) {
- try {
- return client.getChildren(path);
+ client.subscribeStateChanges(new IZkStateListener() {
+ public void handleStateChanged(KeeperState state) throws Exception {
+ ZkclientZookeeperClient.this.state = state;
+ if (state == KeeperState.Disconnected) {
+ stateChanged(StateListener.DISCONNECTED);
+ } else if (state == KeeperState.SyncConnected) {
+ stateChanged(StateListener.CONNECTED);
+ }
+ }
+
+ public void handleNewSession() throws Exception {
+ stateChanged(StateListener.RECONNECTED);
+ }
+
+ //@Override
+ public void handleSessionEstablishmentError(Throwable error) throws Exception {
+ //TODO list...
+ logger.error("zookeeper connection error!", error);
+ throw new Exception(error);
+ }
+ });
+ }
+
+ public void createPersistent(String path) {
+ try {
+ client.createPersistent(path, true);
+ } catch (ZkNodeExistsException e) {
+ }
+ }
+
+ public void createEphemeral(String path) {
+ try {
+ client.createEphemeral(path);
+ } catch (ZkNodeExistsException e) {
+ }
+ }
+
+ public void delete(String path) {
+ try {
+ client.delete(path);
+ } catch (ZkNoNodeException e) {
+ }
+ }
+
+ public List getChildren(String path) {
+ try {
+ return client.getChildren(path);
} catch (ZkNoNodeException e) {
return null;
}
- }
-
- public boolean isConnected() {
- return state == KeeperState.SyncConnected;
- }
-
- public void doClose() {
- client.close();
- }
-
- public IZkChildListener createTargetChildListener(String path, final ChildListener listener) {
- return new IZkChildListener() {
- public void handleChildChange(String parentPath, List currentChilds)
- throws Exception {
- listener.childChanged(parentPath, currentChilds);
- }
- };
- }
-
- public List addTargetChildListener(String path, final IZkChildListener listener) {
- return client.subscribeChildChanges(path, listener);
- }
-
- public void removeTargetChildListener(String path, IZkChildListener listener) {
- client.unsubscribeChildChanges(path, listener);
- }
+ }
+
+ public boolean isConnected() {
+ return state == KeeperState.SyncConnected;
+ }
+
+ public void doClose() {
+ client.close();
+ }
+
+ public IZkChildListener createTargetChildListener(String path, final ChildListener listener) {
+ return new IZkChildListener() {
+ public void handleChildChange(String parentPath, List currentChilds)
+ throws Exception {
+ listener.childChanged(parentPath, currentChilds);
+ }
+ };
+ }
+
+ public List addTargetChildListener(String path, final IZkChildListener listener) {
+ return client.subscribeChildChanges(path, listener);
+ }
+
+ public void removeTargetChildListener(String path, IZkChildListener listener) {
+ client.unsubscribeChildChanges(path, listener);
+ }
}
diff --git a/dubbo-remoting/pom.xml b/dubbo-remoting/pom.xml
index 0c7faf42bbc..d4f4cd4d4ee 100644
--- a/dubbo-remoting/pom.xml
+++ b/dubbo-remoting/pom.xml
@@ -18,7 +18,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-remoting
pom
diff --git a/dubbo-rpc/dubbo-rpc-api/pom.xml b/dubbo-rpc/dubbo-rpc-api/pom.xml
index e713642d38e..a08df335504 100644
--- a/dubbo-rpc/dubbo-rpc-api/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-api
jar
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/utils/ErrorCodeUtils.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/utils/ErrorCodeUtils.java
new file mode 100644
index 00000000000..edd6035f614
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/utils/ErrorCodeUtils.java
@@ -0,0 +1,25 @@
+package com.alibaba.dubbo.rpc.utils;
+
+import com.alibaba.dubbo.rpc.RpcException;
+
+import java.io.IOException;
+import java.net.SocketTimeoutException;
+
+/**
+ * Created by yangjunming on 2/24/16.
+ * author: yangjunming@huijiame.com
+ */
+public class ErrorCodeUtils {
+
+ public static int getErrorCode(Throwable e, Class> cls) {
+ // 是根据测试Case发现的问题,对RpcException.setCode进行设置
+ if (SocketTimeoutException.class.equals(cls)) {
+ return RpcException.TIMEOUT_EXCEPTION;
+ } else if (IOException.class.isAssignableFrom(cls)) {
+ return RpcException.NETWORK_EXCEPTION;
+ } else if (ClassNotFoundException.class.isAssignableFrom(cls)) {
+ return RpcException.SERIALIZATION_EXCEPTION;
+ }
+ return 0;
+ }
+}
diff --git a/dubbo-rpc/dubbo-rpc-default/pom.xml b/dubbo-rpc/dubbo-rpc-default/pom.xml
index a31250d37db..eab1863edeb 100644
--- a/dubbo-rpc/dubbo-rpc-default/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-default/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-default
jar
diff --git a/dubbo-rpc/dubbo-rpc-hessian/pom.xml b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
index bf5e50cb4c6..2fac2e54d7b 100644
--- a/dubbo-rpc/dubbo-rpc-hessian/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-hessian
jar
diff --git a/dubbo-rpc/dubbo-rpc-http/pom.xml b/dubbo-rpc/dubbo-rpc-http/pom.xml
index a2ad7c134f3..6d397fb7085 100644
--- a/dubbo-rpc/dubbo-rpc-http/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-http/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-http
jar
diff --git a/dubbo-rpc/dubbo-rpc-http/src/main/java/com/alibaba/dubbo/rpc/protocol/http/HttpProtocol.java b/dubbo-rpc/dubbo-rpc-http/src/main/java/com/alibaba/dubbo/rpc/protocol/http/HttpProtocol.java
index 84bc398a3fb..3b7c9504073 100644
--- a/dubbo-rpc/dubbo-rpc-http/src/main/java/com/alibaba/dubbo/rpc/protocol/http/HttpProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-http/src/main/java/com/alibaba/dubbo/rpc/protocol/http/HttpProtocol.java
@@ -15,22 +15,6 @@
*/
package com.alibaba.dubbo.rpc.protocol.http;
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.SocketTimeoutException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.remoting.RemoteAccessException;
-import org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor;
-import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;
-import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;
-import org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor;
-
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.remoting.http.HttpBinder;
@@ -39,22 +23,39 @@
import com.alibaba.dubbo.rpc.RpcContext;
import com.alibaba.dubbo.rpc.RpcException;
import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import com.alibaba.dubbo.rpc.utils.ErrorCodeUtils;
+import org.springframework.remoting.RemoteAccessException;
+import org.springframework.remoting.httpinvoker.HttpComponentsHttpInvokerRequestExecutor;
+import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;
+import org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter;
+import org.springframework.remoting.httpinvoker.SimpleHttpInvokerRequestExecutor;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+//import org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor;
+//http://forum.spring.io/forum/spring-projects/web/744585-commonshttpinvokerrequestexecutor-in-spring-4-0
/**
* HttpProtocol
- *
+ *
* @author william.liangf
*/
public class HttpProtocol extends AbstractProxyProtocol {
- public static final int DEFAULT_PORT = 80;
+ public static final int DEFAULT_PORT = 80;
private final Map serverMap = new ConcurrentHashMap();
private final Map skeletonMap = new ConcurrentHashMap();
private HttpBinder httpBinder;
-
+
public HttpProtocol() {
super(RemoteAccessException.class);
}
@@ -68,12 +69,12 @@ public int getDefaultPort() {
}
private class InternalHandler implements HttpHandler {
-
+
public void handle(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
String uri = request.getRequestURI();
HttpInvokerServiceExporter skeleton = skeletonMap.get(uri);
- if (! request.getMethod().equalsIgnoreCase("POST")) {
+ if (!request.getMethod().equalsIgnoreCase("POST")) {
response.setStatus(500);
} else {
RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
@@ -84,7 +85,7 @@ public void handle(HttpServletRequest request, HttpServletResponse response)
}
}
}
-
+
}
protected Runnable doExport(final T impl, Class type, URL url) throws RpcException {
@@ -118,21 +119,22 @@ protected T doRefer(final Class serviceType, final URL url) throws RpcExc
httpProxyFactoryBean.setServiceInterface(serviceType);
String client = url.getParameter(Constants.CLIENT_KEY);
if (client == null || client.length() == 0 || "simple".equals(client)) {
- SimpleHttpInvokerRequestExecutor httpInvokerRequestExecutor = new SimpleHttpInvokerRequestExecutor() {
- protected void prepareConnection(HttpURLConnection con,
- int contentLength) throws IOException {
- super.prepareConnection(con, contentLength);
- con.setReadTimeout(url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT));
- con.setConnectTimeout(url.getParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT));
- }
- };
- httpProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
+ SimpleHttpInvokerRequestExecutor httpInvokerRequestExecutor = new SimpleHttpInvokerRequestExecutor() {
+ protected void prepareConnection(HttpURLConnection con,
+ int contentLength) throws IOException {
+ super.prepareConnection(con, contentLength);
+ con.setReadTimeout(url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT));
+ con.setConnectTimeout(url.getParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT));
+ }
+ };
+ httpProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
} else if ("commons".equals(client)) {
- CommonsHttpInvokerRequestExecutor httpInvokerRequestExecutor = new CommonsHttpInvokerRequestExecutor();
- httpInvokerRequestExecutor.setReadTimeout(url.getParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT));
- httpProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
+ HttpComponentsHttpInvokerRequestExecutor httpInvokerRequestExecutor = new HttpComponentsHttpInvokerRequestExecutor();
+ //CommonsHttpInvokerRequestExecutor httpInvokerRequestExecutor = new CommonsHttpInvokerRequestExecutor();
+ httpInvokerRequestExecutor.setReadTimeout(url.getParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT));
+ httpProxyFactoryBean.setHttpInvokerRequestExecutor(httpInvokerRequestExecutor);
} else if (client != null && client.length() > 0) {
- throw new IllegalStateException("Unsupported http protocol client " + client + ", only supported: simple, commons");
+ throw new IllegalStateException("Unsupported http protocol client " + client + ", only supported: simple, commons");
}
httpProxyFactoryBean.afterPropertiesSet();
return (T) httpProxyFactoryBean.getObject();
@@ -144,16 +146,19 @@ protected int getErrorCode(Throwable e) {
}
if (e != null) {
Class> cls = e.getClass();
- // 是根据测试Case发现的问题,对RpcException.setCode进行设置
- if (SocketTimeoutException.class.equals(cls)) {
- return RpcException.TIMEOUT_EXCEPTION;
- } else if (IOException.class.isAssignableFrom(cls)) {
- return RpcException.NETWORK_EXCEPTION;
- } else if (ClassNotFoundException.class.isAssignableFrom(cls)) {
- return RpcException.SERIALIZATION_EXCEPTION;
- }
+// // 是根据测试Case发现的问题,对RpcException.setCode进行设置
+// if (SocketTimeoutException.class.equals(cls)) {
+// return RpcException.TIMEOUT_EXCEPTION;
+// } else if (IOException.class.isAssignableFrom(cls)) {
+// return RpcException.NETWORK_EXCEPTION;
+// } else if (ClassNotFoundException.class.isAssignableFrom(cls)) {
+// return RpcException.SERIALIZATION_EXCEPTION;
+// }
+ return ErrorCodeUtils.getErrorCode(e, cls);
+
}
return super.getErrorCode(e);
}
+
}
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-injvm/pom.xml b/dubbo-rpc/dubbo-rpc-injvm/pom.xml
index dcdda8d5345..828104482ef 100644
--- a/dubbo-rpc/dubbo-rpc-injvm/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-injvm/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-injvm
jar
diff --git a/dubbo-rpc/dubbo-rpc-memcached/pom.xml b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
index 6a2af14c3c6..3294c5ed31a 100644
--- a/dubbo-rpc/dubbo-rpc-memcached/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-memcached
jar
diff --git a/dubbo-rpc/dubbo-rpc-redis/pom.xml b/dubbo-rpc/dubbo-rpc-redis/pom.xml
index 9e39b9fa31f..46e5f017cf7 100644
--- a/dubbo-rpc/dubbo-rpc-redis/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-redis/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-redis
jar
diff --git a/dubbo-rpc/dubbo-rpc-rest/pom.xml b/dubbo-rpc/dubbo-rpc-rest/pom.xml
index 11edf84ca91..91b5d2379fc 100644
--- a/dubbo-rpc/dubbo-rpc-rest/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-rest/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-rest
jar
diff --git a/dubbo-rpc/dubbo-rpc-rmi/pom.xml b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
index 84b76b9a059..5d9f4ecb366 100644
--- a/dubbo-rpc/dubbo-rpc-rmi/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-rmi
jar
diff --git a/dubbo-rpc/dubbo-rpc-rmi/src/main/java/com/alibaba/dubbo/rpc/protocol/rmi/RmiProtocol.java b/dubbo-rpc/dubbo-rpc-rmi/src/main/java/com/alibaba/dubbo/rpc/protocol/rmi/RmiProtocol.java
index 79c8a834172..ef83b9ad5fc 100644
--- a/dubbo-rpc/dubbo-rpc-rmi/src/main/java/com/alibaba/dubbo/rpc/protocol/rmi/RmiProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-rmi/src/main/java/com/alibaba/dubbo/rpc/protocol/rmi/RmiProtocol.java
@@ -15,26 +15,24 @@
*/
package com.alibaba.dubbo.rpc.protocol.rmi;
-import java.io.IOException;
-import java.net.SocketTimeoutException;
-import java.rmi.RemoteException;
-
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import com.alibaba.dubbo.rpc.utils.ErrorCodeUtils;
import org.springframework.remoting.RemoteAccessException;
import org.springframework.remoting.rmi.RmiProxyFactoryBean;
import org.springframework.remoting.rmi.RmiServiceExporter;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.rpc.RpcException;
-import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import java.rmi.RemoteException;
/**
* RmiProtocol.
- *
+ *
* @author qian.lei
*/
public class RmiProtocol extends AbstractProxyProtocol {
- public static final int DEFAULT_PORT = 1099;
+ public static final int DEFAULT_PORT = 1099;
public RmiProtocol() {
super(RemoteAccessException.class, RemoteException.class);
@@ -84,14 +82,15 @@ protected int getErrorCode(Throwable e) {
}
if (e != null && e.getCause() != null) {
Class> cls = e.getCause().getClass();
- // 是根据测试Case发现的问题,对RpcException.setCode进行设置
- if (SocketTimeoutException.class.equals(cls)) {
- return RpcException.TIMEOUT_EXCEPTION;
- } else if (IOException.class.isAssignableFrom(cls)) {
- return RpcException.NETWORK_EXCEPTION;
- } else if (ClassNotFoundException.class.isAssignableFrom(cls)) {
- return RpcException.SERIALIZATION_EXCEPTION;
- }
+// // 是根据测试Case发现的问题,对RpcException.setCode进行设置
+// if (SocketTimeoutException.class.equals(cls)) {
+// return RpcException.TIMEOUT_EXCEPTION;
+// } else if (IOException.class.isAssignableFrom(cls)) {
+// return RpcException.NETWORK_EXCEPTION;
+// } else if (ClassNotFoundException.class.isAssignableFrom(cls)) {
+// return RpcException.SERIALIZATION_EXCEPTION;
+// }
+ return ErrorCodeUtils.getErrorCode(e, cls);
}
return super.getErrorCode(e);
}
diff --git a/dubbo-rpc/dubbo-rpc-thrift/pom.xml b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
index 4b5d5d075ec..ab808b4318f 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
@@ -14,55 +14,68 @@
- limitations under the License.
-->
- 4.0.0
-
- com.alibaba
- dubbo-rpc
- 2.8.4
-
- dubbo-rpc-thrift
- jar
- ${project.artifactId}
- The thrift rpc module of dubbo project
-
- true
-
-
-
- com.alibaba
- dubbo-rpc-api
- ${project.parent.version}
-
-
- com.alibaba
- dubbo-rpc-default
- ${project.parent.version}
-
-
- com.alibaba
- dubbo-remoting-api
- ${project.parent.version}
-
-
- com.alibaba
- dubbo-remoting-netty
- ${project.parent.version}
-
-
- org.apache.thrift
- libthrift
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+
+ com.alibaba
+ dubbo-rpc
+ 2.8.4a
+
+ dubbo-rpc-thrift
+ jar
+ ${project.artifactId}
+ The thrift rpc module of dubbo project
+
+ true
+
+
+
+ com.alibaba
+ dubbo-rpc-api
+ ${project.parent.version}
+
+
+ com.alibaba
+ dubbo-rpc-default
+ ${project.parent.version}
+
+
+ com.alibaba
+ dubbo-remoting-api
+ ${project.parent.version}
+
+
+ com.alibaba
+ dubbo-remoting-netty
+ ${project.parent.version}
+
+
+ org.apache.thrift
+ libthrift
org.apache.httpcomponents
httpcore
-
+
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j_version}
+
+
org.apache.httpcomponents
httpclient
+
+
+ commons-lang
+ commons-lang
+
+
com.alibaba
dubbo-config-spring
@@ -75,5 +88,5 @@
${project.parent.version}
test
-
+
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java
index 71741e10571..57fdb496221 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java
+++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java
@@ -5,21 +5,6 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
public interface ClassNameTestDubbo {
public String echo(String arg);
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestThrift.java b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestThrift.java
index 8d48664d46d..257475780cb 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestThrift.java
+++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestThrift.java
@@ -3,21 +3,12 @@
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.EnumMap;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.BitSet;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.*;
+
public class ClassNameTestThrift {
public interface Iface {
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-consumer.xml b/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-consumer.xml
index 4f1ccc42380..0d7b84795c6 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-consumer.xml
+++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-consumer.xml
@@ -8,7 +8,9 @@
-
+
+
+
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-provider.xml b/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-provider.xml
index 8727b7bea1e..f90464b641e 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-provider.xml
+++ b/dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-provider.xml
@@ -8,7 +8,9 @@
-
+
+
+
diff --git a/dubbo-rpc/dubbo-rpc-webservice/pom.xml b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
index 069d285b432..c50d9d1bdca 100644
--- a/dubbo-rpc/dubbo-rpc-webservice/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4
+ 2.8.4a
dubbo-rpc-webservice
jar
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index 4dd07112ac0..874479f4419 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-rpc
pom
diff --git a/dubbo-simple/dubbo-monitor-simple/pom.xml b/dubbo-simple/dubbo-monitor-simple/pom.xml
index 4068dfc52fa..307638c528a 100644
--- a/dubbo-simple/dubbo-monitor-simple/pom.xml
+++ b/dubbo-simple/dubbo-monitor-simple/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-simple
- 2.8.4
+ 2.8.4a
dubbo-monitor-simple
jar
@@ -75,7 +75,9 @@
zookeeper
- com.github.sgroschupf
+
+
+ com.101tec
zkclient
diff --git a/dubbo-simple/dubbo-registry-simple/pom.xml b/dubbo-simple/dubbo-registry-simple/pom.xml
index 6c1912bee66..880f7596628 100644
--- a/dubbo-simple/dubbo-registry-simple/pom.xml
+++ b/dubbo-simple/dubbo-registry-simple/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-simple
- 2.8.4
+ 2.8.4a
dubbo-registry-simple
jar
diff --git a/dubbo-simple/pom.xml b/dubbo-simple/pom.xml
index 5bb270f0179..ff4e1da5e8d 100644
--- a/dubbo-simple/pom.xml
+++ b/dubbo-simple/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-simple
pom
diff --git a/dubbo-test/dubbo-test-benchmark-api/pom.xml b/dubbo-test/dubbo-test-benchmark-api/pom.xml
index 79f9a30036c..1310c1db3c7 100644
--- a/dubbo-test/dubbo-test-benchmark-api/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark-api/pom.xml
@@ -4,7 +4,7 @@
com.alibaba
dubbo-test
- 2.8.4
+ 2.8.4a
dubbo-test-benchmark-api
jar
diff --git a/dubbo-test/dubbo-test-benchmark-client/pom.xml b/dubbo-test/dubbo-test-benchmark-client/pom.xml
index 09aded71106..6150fec8ee5 100644
--- a/dubbo-test/dubbo-test-benchmark-client/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark-client/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4
+ 2.8.4a
dubbo-test-benchmark-client
jar
@@ -81,7 +81,9 @@
zookeeper
- com.github.sgroschupf
+
+
+ com.101tec
zkclient
diff --git a/dubbo-test/dubbo-test-benchmark-server/pom.xml b/dubbo-test/dubbo-test-benchmark-server/pom.xml
index 9a97c7df23f..d6f8ad9a920 100644
--- a/dubbo-test/dubbo-test-benchmark-server/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark-server/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4
+ 2.8.4a
dubbo-test-benchmark-server
jar
@@ -76,7 +76,9 @@
zookeeper
- com.github.sgroschupf
+
+
+ com.101tec
zkclient
diff --git a/dubbo-test/dubbo-test-benchmark/pom.xml b/dubbo-test/dubbo-test-benchmark/pom.xml
index 2593c9e5054..beef341d9ec 100644
--- a/dubbo-test/dubbo-test-benchmark/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4
+ 2.8.4a
dubbo-test-benchmark
jar
diff --git a/dubbo-test/dubbo-test-compatibility/pom.xml b/dubbo-test/dubbo-test-compatibility/pom.xml
index d02370e64cc..3db5b2ebb80 100644
--- a/dubbo-test/dubbo-test-compatibility/pom.xml
+++ b/dubbo-test/dubbo-test-compatibility/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4
+ 2.8.4a
dubbo-test-compatibility
jar
diff --git a/dubbo-test/dubbo-test-examples/pom.xml b/dubbo-test/dubbo-test-examples/pom.xml
index 43b4b699291..796520c21f5 100644
--- a/dubbo-test/dubbo-test-examples/pom.xml
+++ b/dubbo-test/dubbo-test-examples/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4
+ 2.8.4a
dubbo-test-examples
jar
diff --git a/dubbo-test/dubbo-test-integration/pom.xml b/dubbo-test/dubbo-test-integration/pom.xml
index cbf43a6836a..c78187636c5 100644
--- a/dubbo-test/dubbo-test-integration/pom.xml
+++ b/dubbo-test/dubbo-test-integration/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4
+ 2.8.4a
dubbo-test-integration
jar
diff --git a/dubbo-test/pom.xml b/dubbo-test/pom.xml
index 8ccfec26d31..eb8e6da6b4d 100644
--- a/dubbo-test/pom.xml
+++ b/dubbo-test/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-test
pom
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
index 844d9844dbd..7543c247fad 100644
--- a/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
@@ -4,7 +4,7 @@
com.alibaba
dubbo-demo-lite-archetype
- 2.8.4
+ 2.8.4a
maven-archetype
dubbo-demo-lite-archetype
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
index 561a683e509..932e4f6f148 100644
--- a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
@@ -18,7 +18,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
${artifactId}
${groupId}
@@ -35,7 +35,7 @@
com.alibaba
dubbo
- 2.8.4
+ 2.8.4a
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
index fb06b640479..ca60b9d181a 100644
--- a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo-lite
- 2.8.4
+ 2.8.4a
dubbo-demo-lite-api
jar
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
index e59c2df0903..aca6849a04f 100644
--- a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo-lite
- 2.8.4
+ 2.8.4a
dubbo-demo-lite-consumer
jar
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
index ab2cead41cd..7b0330d6a1d 100644
--- a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo-lite
- 2.8.4
+ 2.8.4a
dubbo-demo-lite-provider
war
diff --git a/dubbo-tool/dubbo-demo-lite/pom.xml b/dubbo-tool/dubbo-demo-lite/pom.xml
index b43142ae691..26e7e882a97 100644
--- a/dubbo-tool/dubbo-demo-lite/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-demo-lite
pom
@@ -39,7 +39,7 @@
com.alibaba
dubbo
- 2.8.4
+ 2.8.4a
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index 1ff4074b884..1d6b54b24b4 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -19,7 +19,8 @@
com.alibaba
dubbo-parent
- 2.8.4
+
+ 2.8.4a
dubbo
jar
@@ -335,6 +336,7 @@
maven-javadoc-plugin
+ 2.10.3
attach-javadoc
diff --git a/hessian-lite/pom.xml b/hessian-lite/pom.xml
index c377884a45e..f0cf07b3b42 100644
--- a/hessian-lite/pom.xml
+++ b/hessian-lite/pom.xml
@@ -6,7 +6,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
hessian-lite
jar
diff --git a/pom.xml b/pom.xml
index f4e69f74a4b..b866ade60d0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,11 +16,9 @@
4.0.0
-
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
pom
${project.artifactId}
The parent project of dubbo
@@ -84,43 +82,58 @@
- 3.2.9.RELEASE
+
+ 4.2.4.RELEASE
3.15.0-GA
- 3.7.0.Final
+
+ 3.9.9.Final
1.1.7
+
2.1.4
- 4.2.1
+
+ 4.3.4
3.2.1-fixed-2
- 1.4.1
- 1.1.39
+
+ 1.4.8
+
+ 1.2.6
3.1
0.8
3.4.6
- 0.1
+
+ 0.81
2.5.0
2.1.0
1.3.6
2.6.1
- 0.8.0
+ 0.9.3
1.0.13
4.0.7
3.1.0
6.1.26
1.0.0.GA
- 4.2.0.Final
+
+ 5.2.4.Final
0.4
2.0-M5.1
3.0
2.2
3.0.8
- 2.3.3
+
+ 2.7.1
+
1.6
+ 2.6
8.0.11
- 1.6.2
+
+ 1.7.15
1.1
- 1.2.16
- 1.0.6
+
+ 1.2.17
+
+ 1.1.5
+ 2.5
4.10
3.0
@@ -157,6 +170,8 @@
2.7
2.17
+ 8.1.15.v20140411
+
@@ -224,9 +239,18 @@
${zookeeper_version}
- com.github.sgroschupf
+ com.101tec
zkclient
${zkclient_version}
+
+
+
+
+
+
+
+
+
org.apache.curator
@@ -344,6 +368,16 @@
logback-classic
${logback_version}
+
+ org.apache.logging.log4j
+ log4j-core
+ ${log4j2_version}
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+ ${log4j2_version}
+
junit
@@ -374,6 +408,11 @@
cglib-nodep
${cglib_version}
+
+ commons-lang
+ commons-lang
+ ${commons-lang_version}
+
commons-pool
commons-pool
@@ -489,77 +528,77 @@
-
- org.apache.maven.plugins
- maven-surefire-plugin
- ${maven-surefire-plugin_version}
-
- true
- once
- ${argline}
-
-
-
- transporter
- ${transporter}
-
-
- serialization
- ${serialization}
-
-
-
- port
- ${port}
-
-
- threadpool
- ${threadpool}
-
-
- threads
- ${threads}
-
-
- iothreads
- ${iothreads}
-
-
-
- server
- ${server}
-
-
- timeout
- ${timeout}
-
-
- length
- ${length}
-
-
- connections
- ${connections}
-
-
- base
- ${base}
-
-
- concurrent
- ${concurrent}
-
-
- runs
- ${runs}
-
-
- onerror
- ${onerror}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
org.apache.maven.plugins
maven-deploy-plugin
@@ -600,9 +639,9 @@
${java_target_version}
${file_encoding}
-
- -XX:MaxPermSize=512M
-
+
+
+
+ 2.0.1
+ 3.0.9.Final
+ 3.0.16.Final
+ 3.0.14.Final
+ 3.0.14.Final
+ 3.0.14.Final
+ 3.0.16.Final
+ 2.24.0
+ 0.37
+ 2.44
+
false
@@ -428,42 +441,40 @@
tomcat-embed-logging-juli
${tomcat_embed_version}
-
-
javax.ws.rs
javax.ws.rs-api
- 2.0
+ ${rs-api_version}
org.jboss.resteasy
resteasy-jaxrs
- 3.0.7.Final
+ ${resteasy-jaxrs_version}
org.jboss.resteasy
resteasy-client
- 3.0.7.Final
+ ${resteasy-jaxrs_version}
org.jboss.resteasy
resteasy-netty
- 3.0.7.Final
+ ${resteasy-netty_version}
org.jboss.resteasy
resteasy-jdk-http
- 3.0.7.Final
+ ${resteasy-jdk-http_version}
org.jboss.resteasy
resteasy-jackson-provider
- 3.0.7.Final
+ ${resteasy-jackson-provider_version}
org.jboss.resteasy
resteasy-jaxb-provider
- 3.0.7.Final
+ ${resteasy-jaxb-provider_version}
com.esotericsoftware.kryo
@@ -473,12 +484,12 @@
de.javakaffee
kryo-serializers
- 0.26
+ ${kryo-serializers_version}
de.ruedigermoeller
fst
- 1.55
+ ${fst_version}
From 3a61a8b6d81851cdf6ca41289aa461336475de6f Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Mon, 29 Feb 2016 22:30:15 +0800
Subject: [PATCH 03/32] recover dubbo-admin to spring 3.x
---
README.md | 3 +
dubbo-admin/pom.xml | 297 +++++++++---------
.../web/common/module/screen/Restful.java | 142 +++++----
.../webapp/WEB-INF/applicationContext.xml | 6 +
.../src/main/webapp/WEB-INF/dubbo.properties | 2 +-
dubbo-admin/src/main/webapp/WEB-INF/log4j.xml | 41 +--
.../dubbo/common/logger/LoggerFactory.java | 2 +-
dubbo-demo/dubbo-demo-consumer/pom.xml | 10 +
.../src/test/resources/log4j.xml | 28 --
.../src/test/resources/log4j2.xml | 13 +
dubbo-demo/dubbo-demo-provider/pom.xml | 26 +-
.../META-INF/spring/service-provider.xml | 13 +-
.../src/main/resources/log4j.xml | 28 --
.../src/main/resources/log4j2.xml | 13 +
.../src/main/assembly/conf/dubbo.properties | 4 +-
pom.xml | 3 +-
16 files changed, 301 insertions(+), 330 deletions(-)
create mode 100644 dubbo-admin/src/main/webapp/WEB-INF/applicationContext.xml
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j.xml
create mode 100644 dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j2.xml
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.xml
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/resources/log4j2.xml
diff --git a/README.md b/README.md
index 8be6642a82d..9080c0412b2 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,9 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* 修正Dubbo管理界面中没有consumer时出现空指针异常(马金凯)
* 修正@Reference annotation中protocol设置不起作用的bug(沈理)
* 修正@Reference annotation放在setter方法上即会出错的bug(Dylan)
+* **dubbox-2.8.4a:
+ * 升级spring到4.x,其它一些依赖组件也一并进行了版本升级(杨俊明)
+ * 增加log4j2支持,原来一些硬编码依赖log4j的代码,改为依赖slf4j,以便兼容其它一些主流日志组件(杨俊明)
## 依赖
diff --git a/dubbo-admin/pom.xml b/dubbo-admin/pom.xml
index b3e416412e0..8db8e3a35d9 100644
--- a/dubbo-admin/pom.xml
+++ b/dubbo-admin/pom.xml
@@ -1,12 +1,12 @@
- 4.0.0
-
- com.alibaba
- dubbo-parent
-
- 2.8.4a
-
- dubbo-admin
- war
- ${project.artifactId}
- The admin module of dubbo project
-
- 1.5
- /
- false
- false
-
-
-
- com.alibaba
- dubbo
- ${project.parent.version}
-
-
- com.alibaba.citrus
- citrus-webx-all
-
-
- org.javassist
- javassist
-
-
- io.netty
- netty
-
-
- org.apache.mina
- mina-core
-
-
- org.glassfish.grizzly
- grizzly-core
-
-
- org.apache.httpcomponents
- httpclient
-
-
- com.alibaba
- fastjson
-
-
- com.thoughtworks.xstream
- xstream
-
-
- org.apache.bsf
- bsf-api
-
-
- org.apache.zookeeper
- zookeeper
-
-
-
-
- com.101tec
- zkclient
-
-
- org.apache.curator
- curator-framework
-
-
- com.googlecode.xmemcached
- xmemcached
-
-
- org.apache.thrift
- libthrift
-
-
- com.caucho
- hessian
-
-
- javax.servlet
- javax.servlet-api
- provided
-
-
- log4j
- log4j
-
-
- org.slf4j
- slf4j-api
-
-
- org.slf4j
- slf4j-log4j12
-
-
- redis.clients
- jedis
-
-
- javax.validation
- validation-api
-
-
- org.hibernate
- hibernate-validator
-
-
- javax.cache
- cache-api
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.mortbay.jetty
- jetty-maven-plugin
- ${maven-jetty-plugin_version}
-
- exit
- 8080
- 10
-
-
- /
-
-
-
-
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+
+ com.alibaba
+ dubbo-parent
+ 2.8.4
+
+ dubbo-admin
+ war
+ ${project.artifactId}
+ The admin module of dubbo project
+
+ 1.5
+ /
+ false
+ false
+ 8.1.15.v20140411
+ 3.2.7.RELEASE
+
+
+
+ com.alibaba
+ dubbo
+ ${project.parent.version}
+
+
+ com.alibaba.citrus
+ citrus-webx-all
+
+
+ org.javassist
+ javassist
+
+
+ io.netty
+ netty
+
+
+ org.apache.mina
+ mina-core
+
+
+ org.glassfish.grizzly
+ grizzly-core
+
+
+ org.apache.httpcomponents
+ httpclient
+
+
+ com.alibaba
+ fastjson
+
+
+ com.thoughtworks.xstream
+ xstream
+
+
+ org.apache.bsf
+ bsf-api
+
+
+ org.apache.zookeeper
+ zookeeper
+
+
+ com.101tec
+ zkclient
+
+
+ org.apache.curator
+ curator-framework
+
+
+ com.googlecode.xmemcached
+ xmemcached
+
+
+ org.apache.thrift
+ libthrift
+
+
+ com.caucho
+ hessian
+
+
+ javax.servlet
+ javax.servlet-api
+ provided
+
+
+ log4j
+ log4j
+
+
+ org.slf4j
+ slf4j-api
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ redis.clients
+ jedis
+
+
+ javax.validation
+ validation-api
+
+
+ org.hibernate
+ hibernate-validator
+
+
+ javax.cache
+ cache-api
+
+
+
+
+
+ org.mortbay.jetty
+ jetty-maven-plugin
+ ${maven-jetty-plugin_version}
+
+ exit
+ 8080
+ 10
+
+
+ /
+
+
+
+
+
+
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/common/module/screen/Restful.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/common/module/screen/Restful.java
index f5d385dbaf0..cb7ad262424 100644
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/common/module/screen/Restful.java
+++ b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/common/module/screen/Restful.java
@@ -7,6 +7,14 @@
*/
package com.alibaba.dubbo.governance.web.common.module.screen;
+import com.alibaba.dubbo.common.utils.CompatibleTypeUtils;
+import com.alibaba.dubbo.governance.biz.common.i18n.MessageResourceService;
+import com.alibaba.dubbo.governance.web.common.pulltool.RootContextPath;
+import com.alibaba.dubbo.governance.web.util.WebConstants;
+import com.alibaba.dubbo.registry.common.domain.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -14,89 +22,79 @@
import java.util.Map;
import java.util.regex.Pattern;
-import org.apache.log4j.Logger;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.alibaba.dubbo.common.utils.CompatibleTypeUtils;
-import com.alibaba.dubbo.governance.biz.common.i18n.MessageResourceService;
-import com.alibaba.dubbo.governance.web.common.pulltool.RootContextPath;
-import com.alibaba.dubbo.governance.web.util.WebConstants;
-import com.alibaba.dubbo.registry.common.domain.User;
-
/**
* BaseScreen
- *
+ *
* @author william.liangf
*/
public abstract class Restful {
-
- protected static final Logger logger = Logger.getLogger(Restful.class);
-
- protected static final Pattern SPACE_SPLIT_PATTERN = Pattern.compile("\\s+");
-
- @Autowired
- private MessageResourceService messageResourceService;
-
- public String getMessage(String key, Object... args) {
- return messageResourceService.getMessage(key, args);
- }
-
- //FIXME 把这些辅助方法提取出去
- protected String role = null;
- protected String operator = null;
- protected User currentUser = null;
- protected String operatorAddress = null;
- protected String currentRegistry = null;
-
+
+ protected static final Logger logger = LoggerFactory.getLogger(Restful.class);
+
+ protected static final Pattern SPACE_SPLIT_PATTERN = Pattern.compile("\\s+");
+
+ @Autowired
+ private MessageResourceService messageResourceService;
+
+ public String getMessage(String key, Object... args) {
+ return messageResourceService.getMessage(key, args);
+ }
+
+ //FIXME 把这些辅助方法提取出去
+ protected String role = null;
+ protected String operator = null;
+ protected User currentUser = null;
+ protected String operatorAddress = null;
+ protected String currentRegistry = null;
+
public void execute(Map context) throws Throwable {
- if(context.get(WebConstants.CURRENT_USER_KEY)!=null){
- User user = (User) context.get(WebConstants.CURRENT_USER_KEY);
- currentUser = user;
- operator = user.getUsername();
- role = user.getRole();
- context.put(WebConstants.CURRENT_USER_KEY, user);
+ if (context.get(WebConstants.CURRENT_USER_KEY) != null) {
+ User user = (User) context.get(WebConstants.CURRENT_USER_KEY);
+ currentUser = user;
+ operator = user.getUsername();
+ role = user.getRole();
+ context.put(WebConstants.CURRENT_USER_KEY, user);
}
- operatorAddress = (String)context.get("request.remoteHost");
+ operatorAddress = (String) context.get("request.remoteHost");
context.put("operator", operator);
- context.put("operatorAddress", operatorAddress);
-
+ context.put("operatorAddress", operatorAddress);
+
context.put("currentRegistry", currentRegistry);
-
+
String httpMethod = (String) context.get("request.method");
String method = (String) context.get("_method");
String contextPath = (String) context.get("request.contextPath");
context.put("rootContextPath", new RootContextPath(contextPath));
-
+
// 分析Method
if (method == null || method.length() == 0) {
String id = (String) context.get("id");
- if(id == null || id.length() == 0) {
+ if (id == null || id.length() == 0) {
method = "index";
- }
- else {
+ } else {
method = "show";
}
}
if ("index".equals(method)) {
- if("post".equalsIgnoreCase(httpMethod)) {
+ if ("post".equalsIgnoreCase(httpMethod)) {
method = "create";
}
} else if ("show".equals(method)) {
- if("put".equalsIgnoreCase(httpMethod) || "post".equalsIgnoreCase(httpMethod)) { // 因表单不能提交PUT请求,用POST代替
+ if ("put".equalsIgnoreCase(httpMethod) || "post".equalsIgnoreCase(httpMethod)) { // 因表单不能提交PUT请求,用POST代替
method = "update";
} else if ("delete".equalsIgnoreCase(httpMethod)) { // 因表单不能提交DELETE请求,用参数代替
method = "delete";
}
}
context.put("_method", method);
-
+
try {
Method m = null;
try {
m = getClass().getMethod(method, new Class>[]{Map.class});
} catch (NoSuchMethodException e) {
for (Method mtd : getClass().getMethods()) {
- if (Modifier.isPublic(mtd.getModifiers())
+ if (Modifier.isPublic(mtd.getModifiers())
&& mtd.getName().equals(method)) {
m = mtd;
break;
@@ -109,8 +107,8 @@ public void execute(Map context) throws Throwable {
if (m.getParameterTypes().length > 2) {
throw new IllegalStateException("Unsupport restful method " + m);
} else if (m.getParameterTypes().length == 2
- && (m.getParameterTypes()[0].equals(Map.class)
- || ! m.getParameterTypes()[1].equals(Map.class))) {
+ && (m.getParameterTypes()[0].equals(Map.class)
+ || !m.getParameterTypes()[1].equals(Map.class))) {
throw new IllegalStateException("Unsupport restful method " + m);
}
Object r;
@@ -128,13 +126,13 @@ public void execute(Map context) throws Throwable {
String id = (String) context.get("id");
String[] ids = id == null ? new String[0] : id.split("[.+]+");
value = Array.newInstance(t.getComponentType(), ids.length);
- for (int i = 0; i < ids.length; i ++) {
+ for (int i = 0; i < ids.length; i++) {
Array.set(value, i, convertPrimitive(t.getComponentType(), ids[i]));
}
} else {
value = t.newInstance();
for (Method mtd : t.getMethods()) {
- if (Modifier.isPublic(mtd.getModifiers())
+ if (Modifier.isPublic(mtd.getModifiers())
&& mtd.getName().startsWith("set")
&& mtd.getParameterTypes().length == 1) {
String p = mtd.getName().substring(3, 4).toLowerCase() + mtd.getName().substring(4);
@@ -147,39 +145,39 @@ public void execute(Map context) throws Throwable {
}
}
if (v != null) {
- try {
- mtd.invoke(value, new Object[] { CompatibleTypeUtils.compatibleTypeConvert(v, mtd.getParameterTypes()[0]) });
- } catch (Throwable e) {
- logger.warn(e.getMessage(), e);
- }
+ try {
+ mtd.invoke(value, new Object[]{CompatibleTypeUtils.compatibleTypeConvert(v, mtd.getParameterTypes()[0])});
+ } catch (Throwable e) {
+ logger.warn(e.getMessage(), e);
+ }
}
}
}
}
if (m.getParameterTypes().length == 1) {
- r = m.invoke(this, new Object[] {value});
+ r = m.invoke(this, new Object[]{value});
} else {
- r = m.invoke(this, new Object[] {value, context});
+ r = m.invoke(this, new Object[]{value, context});
}
}
if (m.getReturnType() == boolean.class || m.getReturnType() == Boolean.class) {
context.put("rundata.layout", "redirect");
context.put("rundata.target", "redirect");
context.put("success", r == null || ((Boolean) r).booleanValue());
- if(context.get("redirect")==null){
- context.put("redirect", getDefaultRedirect(context, method));
+ if (context.get("redirect") == null) {
+ context.put("redirect", getDefaultRedirect(context, method));
}
} else if (m.getReturnType() == String.class) {
String redirect = (String) r;
if (redirect == null) {
redirect = getDefaultRedirect(context, method);
}
-
- if(context.get("chain")!=null){
- context.put("rundata.layout", "home");
+
+ if (context.get("chain") != null) {
+ context.put("rundata.layout", "home");
context.put("rundata.target", "home");
- }else{
- context.put("rundata.redirect", redirect);
+ } else {
+ context.put("rundata.redirect", redirect);
}
} else {
context.put("rundata.layout", method);
@@ -200,14 +198,14 @@ public void execute(Map context) throws Throwable {
// context.put("redirect", getDefaultRedirect(context, method));
}
}
-
- private static boolean isPrimitive(Class> cls) {
- return cls.isPrimitive()|| cls == Boolean.class || cls == Byte.class
+
+ private static boolean isPrimitive(Class> cls) {
+ return cls.isPrimitive() || cls == Boolean.class || cls == Byte.class
|| cls == Character.class || cls == Short.class || cls == Integer.class
|| cls == Long.class || cls == Float.class || cls == Double.class
|| cls == String.class;
}
-
+
private static Object convertPrimitive(Class> cls, String value) {
if (cls == boolean.class || cls == Boolean.class) {
return value == null || value.length() == 0 ? false : Boolean.valueOf(value);
@@ -228,10 +226,10 @@ private static Object convertPrimitive(Class> cls, String value) {
}
return value;
}
-
+
private String getDefaultRedirect(Map context, String operate) {
String defaultRedirect = (String) context.get("defaultRedirect");
- return defaultRedirect;
+ return defaultRedirect;
}
-
+
}
diff --git a/dubbo-admin/src/main/webapp/WEB-INF/applicationContext.xml b/dubbo-admin/src/main/webapp/WEB-INF/applicationContext.xml
new file mode 100644
index 00000000000..142def25af2
--- /dev/null
+++ b/dubbo-admin/src/main/webapp/WEB-INF/applicationContext.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-admin/src/main/webapp/WEB-INF/dubbo.properties b/dubbo-admin/src/main/webapp/WEB-INF/dubbo.properties
index c1ec1b3bc23..5b2d27c643e 100644
--- a/dubbo-admin/src/main/webapp/WEB-INF/dubbo.properties
+++ b/dubbo-admin/src/main/webapp/WEB-INF/dubbo.properties
@@ -1,3 +1,3 @@
-dubbo.registry.address=zookeeper://127.0.0.1:2181
+dubbo.registry.address=zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183
dubbo.admin.root.password=root
dubbo.admin.guest.password=guest
\ No newline at end of file
diff --git a/dubbo-admin/src/main/webapp/WEB-INF/log4j.xml b/dubbo-admin/src/main/webapp/WEB-INF/log4j.xml
index e0f2f4404a0..71b1b9b9109 100644
--- a/dubbo-admin/src/main/webapp/WEB-INF/log4j.xml
+++ b/dubbo-admin/src/main/webapp/WEB-INF/log4j.xml
@@ -1,29 +1,16 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java
index 008a4862750..509e2d1be71 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/logger/LoggerFactory.java
@@ -57,7 +57,7 @@ private LoggerFactory() {
setLoggerAdapter(new JdkLoggerAdapter());
} else {
try {
- setLoggerAdapter(new Log4j2LoggerAdapter());
+ setLoggerAdapter(new Log4j2LoggerAdapter());//默认日志类改成log4j2(杨俊明)
} catch (Throwable e1) {
try {
setLoggerAdapter(new Slf4jLoggerAdapter());
diff --git a/dubbo-demo/dubbo-demo-consumer/pom.xml b/dubbo-demo/dubbo-demo-consumer/pom.xml
index 1e57feafec9..f758b833312 100644
--- a/dubbo-demo/dubbo-demo-consumer/pom.xml
+++ b/dubbo-demo/dubbo-demo-consumer/pom.xml
@@ -74,6 +74,16 @@
org.apache.zookeeper
zookeeper
+
+
+ log4j
+ log4j
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
diff --git a/dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j.xml b/dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j.xml
deleted file mode 100644
index 7d716346409..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j2.xml b/dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j2.xml
new file mode 100644
index 00000000000..ccf6466706c
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/pom.xml b/dubbo-demo/dubbo-demo-provider/pom.xml
index 79cb9194ed0..9bb3db3f90d 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -74,6 +74,16 @@
org.apache.zookeeper
zookeeper
+
+
+ log4j
+ log4j
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
@@ -119,14 +129,14 @@
-
- log4j
- log4j
-
-
- org.slf4j
- slf4j-api
-
+
+
+
+
+
+
+
+
redis.clients
jedis
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
index 4c423e151fa..a7232388b5b 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
@@ -25,10 +25,10 @@
-
+
-
+
@@ -58,9 +58,9 @@
-
-
-
+
+
+
@@ -68,7 +68,8 @@
-
+
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.xml
deleted file mode 100644
index ae988c35f13..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j2.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j2.xml
new file mode 100644
index 00000000000..ccf6466706c
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j2.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-simple/dubbo-monitor-simple/src/main/assembly/conf/dubbo.properties b/dubbo-simple/dubbo-monitor-simple/src/main/assembly/conf/dubbo.properties
index 5aa89460f23..ac2b8196a20 100644
--- a/dubbo-simple/dubbo-monitor-simple/src/main/assembly/conf/dubbo.properties
+++ b/dubbo-simple/dubbo-monitor-simple/src/main/assembly/conf/dubbo.properties
@@ -16,8 +16,8 @@
dubbo.container=log4j,spring,registry,jetty
dubbo.application.name=simple-monitor
dubbo.application.owner=
-dubbo.registry.address=multicast://224.5.6.7:1234
-#dubbo.registry.address=zookeeper://127.0.0.1:2181
+#dubbo.registry.address=multicast://224.5.6.7:1234
+dubbo.registry.address=zookeeper://127.0.0.1:2181
#dubbo.registry.address=redis://127.0.0.1:6379
#dubbo.registry.address=dubbo://127.0.0.1:9090
dubbo.protocol.port=7070
diff --git a/pom.xml b/pom.xml
index 90a72042aa0..13528a3ace6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -106,7 +106,7 @@
2.1.0
1.3.6
2.6.1
- 0.9.3
+ 0.8.0
1.0.13
4.0.7
3.1.0
@@ -118,6 +118,7 @@
2.0-M5.1
3.0
2.2
+
3.0.8
2.7.1
From be9b6795a9ffc8cf508a39ae8ccff47c6ceb2dcc Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Mon, 29 Feb 2016 23:03:32 +0800
Subject: [PATCH 04/32] change zkclient version to 0.8.1
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 13528a3ace6..c247f7eca40 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,7 +101,7 @@
0.8
3.4.6
- 0.81
+ 0.8.1
2.5.0
2.1.0
1.3.6
From 688436df2f347ac08bf51a963492ed78708a5e34 Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Sun, 6 Mar 2016 14:10:24 +0800
Subject: [PATCH 05/32] add primitive thrift and hadoop avro support
---
dubbo/pom.xml | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index 1d6b54b24b4..a92fbbfb9f1 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -319,6 +319,32 @@
+
+ com.alibaba
+ dubbo-rpc-thrift2
+ ${project.parent.version}
+
+
+ org.apache.thrift
+ libthrift
+
+
+
+
+ com.alibaba
+ dubbo-rpc-avro
+ ${project.parent.version}
+
+
+ org.apache.avro
+ avro
+
+
+ org.apache.avro
+ avro-ipc
+
+
+
@@ -382,6 +408,7 @@
com.alibaba:dubbo-remoting-http
com.alibaba:dubbo-remoting-zookeeper
com.alibaba:dubbo-rpc-api
+ com.alibaba:dubbo-rpc-avro
com.alibaba:dubbo-rpc-default
com.alibaba:dubbo-rpc-injvm
com.alibaba:dubbo-rpc-rmi
@@ -389,6 +416,7 @@
com.alibaba:dubbo-rpc-http
com.alibaba:dubbo-rpc-webservice
com.alibaba:dubbo-rpc-thrift
+ com.alibaba:dubbo-rpc-thrift2
com.alibaba:dubbo-rpc-memcached
com.alibaba:dubbo-rpc-redis
com.alibaba:dubbo-rpc-rest
From 5c1a97743cbf825a74aa39d06c28619d728879b9 Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Sun, 6 Mar 2016 14:11:11 +0800
Subject: [PATCH 06/32] add primitive thrift and hadoop avro support
---
dubbo-rpc/dubbo-rpc-avro/pom.xml | 47 +++++++
.../dubbo/rpc/protocol/avro/AvroProtocol.java | 69 +++++++++
.../internal/com.alibaba.dubbo.rpc.Protocol | 1 +
dubbo-rpc/dubbo-rpc-thrift2/pom.xml | 51 +++++++
.../rpc/protocol/thrift2/Thrift2Protocol.java | 132 ++++++++++++++++++
.../internal/com.alibaba.dubbo.rpc.Protocol | 1 +
dubbo-rpc/pom.xml | 4 +-
pom.xml | 13 ++
8 files changed, 317 insertions(+), 1 deletion(-)
create mode 100644 dubbo-rpc/dubbo-rpc-avro/pom.xml
create mode 100644 dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
create mode 100644 dubbo-rpc/dubbo-rpc-avro/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
create mode 100644 dubbo-rpc/dubbo-rpc-thrift2/pom.xml
create mode 100644 dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
create mode 100644 dubbo-rpc/dubbo-rpc-thrift2/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
diff --git a/dubbo-rpc/dubbo-rpc-avro/pom.xml b/dubbo-rpc/dubbo-rpc-avro/pom.xml
new file mode 100644
index 00000000000..7066a3dffa9
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-avro/pom.xml
@@ -0,0 +1,47 @@
+
+
+ 4.0.0
+
+ com.alibaba
+ dubbo-rpc
+ 2.8.4a
+
+ dubbo-rpc-avro
+ jar
+ ${project.artifactId}
+ The avro-rpc module of dubbo project
+
+ true
+
+
+
+
+ com.alibaba
+ dubbo-rpc-api
+ ${project.parent.version}
+
+
+ org.apache.avro
+ avro
+
+
+ org.apache.avro
+ avro-ipc
+
+
+
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
new file mode 100644
index 00000000000..188cd68e0a3
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
@@ -0,0 +1,69 @@
+package com.alibaba.dubbo.rpc.protocol.avro;
+
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import org.apache.avro.ipc.NettyServer;
+import org.apache.avro.ipc.NettyTransceiver;
+import org.apache.avro.ipc.Server;
+import org.apache.avro.ipc.reflect.ReflectRequestor;
+import org.apache.avro.ipc.reflect.ReflectResponder;
+
+import java.net.InetSocketAddress;
+
+/**
+ * 为dubbo-rpc添加"原生thrift"支持
+ * by 杨俊明(http://yjmyzz.cnblogs.com/)
+ */
+public class AvroProtocol extends AbstractProxyProtocol {
+ public static final int DEFAULT_PORT = 40881;
+ private static final Logger logger = LoggerFactory.getLogger(AvroProtocol.class);
+
+ public int getDefaultPort() {
+ return DEFAULT_PORT;
+ }
+
+ @Override
+ protected Runnable doExport(T impl, Class type, URL url)
+ throws RpcException {
+
+ logger.info("impl => " + impl.getClass());
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+
+ final Server server = new NettyServer(new ReflectResponder(type, impl),
+ new InetSocketAddress(url.getHost(), url.getPort()));
+ server.start();
+
+ return new Runnable() {
+ public void run() {
+ try {
+ logger.info("Close Avro Server");
+ server.close();
+ } catch (Throwable e) {
+ logger.warn(e.getMessage(), e);
+ }
+ }
+ };
+ }
+
+ @Override
+ protected T doRefer(Class type, URL url) throws RpcException {
+
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+
+ try {
+ NettyTransceiver client = new NettyTransceiver(new InetSocketAddress(url.getHost(), url.getPort()));
+ T ref = ReflectRequestor.getClient(type, client);
+ logger.info("Create Avro Client");
+ return ref;
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create remoting client for service(" + url + "): " + e.getMessage(), e);
+ }
+ }
+
+}
diff --git a/dubbo-rpc/dubbo-rpc-avro/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-avro/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
new file mode 100644
index 00000000000..eb16dd7df50
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-avro/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
@@ -0,0 +1 @@
+avro=com.alibaba.dubbo.rpc.protocol.avro.AvroProtocol
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-thrift2/pom.xml b/dubbo-rpc/dubbo-rpc-thrift2/pom.xml
new file mode 100644
index 00000000000..9f5bb9e6b8f
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-thrift2/pom.xml
@@ -0,0 +1,51 @@
+
+
+ 4.0.0
+
+ com.alibaba
+ dubbo-rpc
+ 2.8.4a
+
+ dubbo-rpc-thrift2
+ jar
+ ${project.artifactId}
+ The avro-rpc module of dubbo project
+
+ true
+
+
+
+
+ com.alibaba
+ dubbo-rpc-api
+ ${project.parent.version}
+
+
+
+ org.apache.thrift
+ libthrift
+ 0.9.3
+
+
+ org.apache.httpcomponents
+ httpcore
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
new file mode 100644
index 00000000000..cc8a7022a57
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
@@ -0,0 +1,132 @@
+package com.alibaba.dubbo.rpc.protocol.thrift2;
+
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import org.apache.thrift.TProcessor;
+import org.apache.thrift.protocol.TCompactProtocol;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.server.TNonblockingServer;
+import org.apache.thrift.server.TServer;
+import org.apache.thrift.transport.TFramedTransport;
+import org.apache.thrift.transport.TNonblockingServerSocket;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
+
+import java.lang.reflect.Constructor;
+
+/**
+ * 为dubbo-rpc添加"原生thrift"支持
+ * by 杨俊明(http://yjmyzz.cnblogs.com/)
+ */
+public class Thrift2Protocol extends AbstractProxyProtocol {
+ public static final int DEFAULT_PORT = 33208;
+ private static final Logger logger = LoggerFactory.getLogger(Thrift2Protocol.class);
+
+ public int getDefaultPort() {
+ return DEFAULT_PORT;
+ }
+
+ @Override
+ protected Runnable doExport(T impl, Class type, URL url)
+ throws RpcException {
+
+ logger.info("impl => " + impl.getClass());
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+
+ TProcessor tprocessor;
+ TNonblockingServer.Args tArgs = null;
+ String iFace = "$Iface";
+ String processor = "$Processor";
+ String typeName = type.getName();
+ TNonblockingServerSocket transport;
+ if (typeName.endsWith(iFace)) {
+ String processorClsName = typeName.substring(0, typeName.indexOf(iFace)) + processor;
+ try {
+ Class> clazz = Class.forName(processorClsName);
+ Constructor constructor = clazz.getConstructor(type);
+ try {
+ tprocessor = (TProcessor) constructor.newInstance(impl);
+ transport = new TNonblockingServerSocket(url.getPort());
+ tArgs = new TNonblockingServer.Args(transport);
+ tArgs.processor(tprocessor);
+ tArgs.transportFactory(new TFramedTransport.Factory());
+ tArgs.protocolFactory(new TCompactProtocol.Factory());
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create thrift server(" + url + ") : " + e.getMessage(), e);
+ }
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create thrift server(" + url + ") : " + e.getMessage(), e);
+ }
+ }
+
+ if (tArgs == null) {
+ logger.error("Fail to create thrift server(" + url + ") due to null args");
+ throw new RpcException("Fail to create thrift server(" + url + ") due to null args");
+ }
+ final TServer thriftServer = new TNonblockingServer(tArgs);
+
+ new Thread(new Runnable() {
+ public void run() {
+ logger.info("Start Thrift Server");
+ thriftServer.serve();
+ logger.info("Thrift server started.");
+ }
+ }).start();
+
+ return new Runnable() {
+ public void run() {
+ try {
+ logger.info("Close Thrift Server");
+ thriftServer.stop();
+ } catch (Throwable e) {
+ logger.warn(e.getMessage(), e);
+ }
+ }
+ };
+ }
+
+ @Override
+ protected T doRefer(Class type, URL url) throws RpcException {
+
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+
+ try {
+ TSocket tSocket;
+ TTransport transport;
+ TProtocol protocol;
+ T thriftClient = null;
+ String iFace = "$Iface";
+ String client = "$Client";
+
+ String typeName = type.getName();
+ if (typeName.endsWith(iFace)) {
+ String clientClsName = typeName.substring(0, typeName.indexOf(iFace)) + client;
+ Class> clazz = Class.forName(clientClsName);
+ Constructor constructor = clazz.getConstructor(TProtocol.class);
+ try {
+ tSocket = new TSocket(url.getHost(), url.getPort());
+ transport = new TFramedTransport(tSocket);
+ protocol = new TCompactProtocol(transport);
+ thriftClient = (T) constructor.newInstance(protocol);
+ transport.open();
+ logger.info("thrift client opened for service(" + url + ")");
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create remoting client:" + e.getMessage(), e);
+ }
+ }
+ return thriftClient;
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create remoting client for service(" + url + "): " + e.getMessage(), e);
+ }
+ }
+
+}
diff --git a/dubbo-rpc/dubbo-rpc-thrift2/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-thrift2/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
new file mode 100644
index 00000000000..e289229aeac
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-thrift2/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
@@ -0,0 +1 @@
+thrift2=com.alibaba.dubbo.rpc.protocol.thrift2.Thrift2Protocol
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index 874479f4419..580b8436f48 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -30,6 +30,7 @@
dubbo-rpc-api
+ dubbo-rpc-avro
dubbo-rpc-default
dubbo-rpc-injvm
dubbo-rpc-rmi
@@ -37,8 +38,9 @@
dubbo-rpc-http
dubbo-rpc-webservice
dubbo-rpc-thrift
+ dubbo-rpc-thrift2
dubbo-rpc-memcached
dubbo-rpc-redis
- dubbo-rpc-rest
+ dubbo-rpc-rest
diff --git a/pom.xml b/pom.xml
index c247f7eca40..5e8284cde0e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,6 +107,8 @@
1.3.6
2.6.1
0.8.0
+ 0.9.3
+ 1.8.0
1.0.13
4.0.7
3.1.0
@@ -185,6 +187,7 @@
2.17
8.1.15.v20140411
+ 1.8.0
@@ -296,6 +299,16 @@
libthrift
${thrift_version}
+
+ org.apache.avro
+ avro
+ ${avro_version}
+
+
+ org.apache.avro
+ avro-ipc
+ ${avro_version}
+
jfree
jfreechart
From fa615fb74efffb9830fa174533d562a32d3d127d Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Sun, 6 Mar 2016 14:12:25 +0800
Subject: [PATCH 07/32] add primitive thrift and hadoop avro support
---
README.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README.md b/README.md
index 9080c0412b2..b04a71e39d6 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,8 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
**注:dubbox和dubbo 2.x是兼容的,没有改变dubbo的任何已有的功能和配置方式(除了升级了spring之类的版本)**
+* ** 支持原生thrift、avro等跨语言的rpc框架(2.8.4a版开始支持),只是非java语言的client调用dubbo的thrift/avro服务时,非java语言的service consumer无法享受dubbo的治理功能
+
## 文档资料
[在Dubbo中开发REST风格的远程调用(RESTful Remoting)](http://dangdangdotcom.github.io/dubbox/rest.html)
@@ -73,6 +75,8 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* **dubbox-2.8.4a:
* 升级spring到4.x,其它一些依赖组件也一并进行了版本升级(杨俊明)
* 增加log4j2支持,原来一些硬编码依赖log4j的代码,改为依赖slf4j,以便兼容其它一些主流日志组件(杨俊明)
+ * 增加原生thrift支持,升级thrift到0.9.3,为避免与dubbo原来的thrift实现命名冲突,新增的原生thrift协议,协议名称改为thrift2(杨俊明)
+ * 增加hadoop avro支持(杨俊明)
## 依赖
From 711c6fa2006665c2d38788807a8f10f2557d016a Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Sun, 6 Mar 2016 14:13:45 +0800
Subject: [PATCH 08/32] add primitive thrift and hadoop avro support
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index b04a71e39d6..c728a73bcc0 100644
--- a/README.md
+++ b/README.md
@@ -32,9 +32,9 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* **修正了dubbo的bug** 包括配置、序列化、管理界面等等的bug。
-**注:dubbox和dubbo 2.x是兼容的,没有改变dubbo的任何已有的功能和配置方式(除了升级了spring之类的版本)**
+* **支持原生thrift、avro等跨语言的rpc框架**(2.8.4a版开始支持),只是非java语言的client调用dubbo的thrift/avro服务时,非java语言的service consumer无法享受dubbo的治理功能
-* ** 支持原生thrift、avro等跨语言的rpc框架(2.8.4a版开始支持),只是非java语言的client调用dubbo的thrift/avro服务时,非java语言的service consumer无法享受dubbo的治理功能
+**注:dubbox和dubbo 2.x是兼容的,没有改变dubbo的任何已有的功能和配置方式(除了升级了spring之类的版本)**
## 文档资料
@@ -72,7 +72,7 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* 修正Dubbo管理界面中没有consumer时出现空指针异常(马金凯)
* 修正@Reference annotation中protocol设置不起作用的bug(沈理)
* 修正@Reference annotation放在setter方法上即会出错的bug(Dylan)
-* **dubbox-2.8.4a:
+* **dubbox-2.8.4a**:
* 升级spring到4.x,其它一些依赖组件也一并进行了版本升级(杨俊明)
* 增加log4j2支持,原来一些硬编码依赖log4j的代码,改为依赖slf4j,以便兼容其它一些主流日志组件(杨俊明)
* 增加原生thrift支持,升级thrift到0.9.3,为避免与dubbo原来的thrift实现命名冲突,新增的原生thrift协议,协议名称改为thrift2(杨俊明)
From d436caba9e822ac9d69c26426313bc1244320f2a Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Sun, 6 Mar 2016 14:24:40 +0800
Subject: [PATCH 09/32] fix dubbo-admin compile error
---
README.md | 2 +-
dubbo-admin/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index c728a73bcc0..6a9e9c06d3b 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* **修正了dubbo的bug** 包括配置、序列化、管理界面等等的bug。
-* **支持原生thrift、avro等跨语言的rpc框架**(2.8.4a版开始支持),只是非java语言的client调用dubbo的thrift/avro服务时,非java语言的service consumer无法享受dubbo的治理功能
+* **支持原生thrift、avro等跨语言的rpc框架**(2.8.4a版开始支持),只是非java语言的client调用dubbo的thrift/avro服务时,consumer无法享受dubbo的治理功能
**注:dubbox和dubbo 2.x是兼容的,没有改变dubbo的任何已有的功能和配置方式(除了升级了spring之类的版本)**
diff --git a/dubbo-admin/pom.xml b/dubbo-admin/pom.xml
index 8db8e3a35d9..22d586b7feb 100644
--- a/dubbo-admin/pom.xml
+++ b/dubbo-admin/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.5.3
dubbo-admin
war
From d43e86b28ce753e62af84e7ae78d0f42e9e4132d Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Sun, 6 Mar 2016 14:53:55 +0800
Subject: [PATCH 10/32] update comment
---
.../dubbo/rpc/protocol/avro/AvroProtocol.java | 2 +-
dubbo/pom.xml | 88 +++++++++----------
2 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
index 188cd68e0a3..04b5227fd02 100644
--- a/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
@@ -14,7 +14,7 @@
import java.net.InetSocketAddress;
/**
- * 为dubbo-rpc添加"原生thrift"支持
+ * 为dubbo-rpc添加avro支持
* by 杨俊明(http://yjmyzz.cnblogs.com/)
*/
public class AvroProtocol extends AbstractProxyProtocol {
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index a92fbbfb9f1..91f09475ad3 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -396,50 +396,50 @@
true
true
-
-
- com.alibaba:hessian-lite
- com.alibaba:dubbo-common
- com.alibaba:dubbo-remoting-api
- com.alibaba:dubbo-remoting-netty
- com.alibaba:dubbo-remoting-mina
- com.alibaba:dubbo-remoting-grizzly
- com.alibaba:dubbo-remoting-p2p
- com.alibaba:dubbo-remoting-http
- com.alibaba:dubbo-remoting-zookeeper
- com.alibaba:dubbo-rpc-api
- com.alibaba:dubbo-rpc-avro
- com.alibaba:dubbo-rpc-default
- com.alibaba:dubbo-rpc-injvm
- com.alibaba:dubbo-rpc-rmi
- com.alibaba:dubbo-rpc-hessian
- com.alibaba:dubbo-rpc-http
- com.alibaba:dubbo-rpc-webservice
- com.alibaba:dubbo-rpc-thrift
- com.alibaba:dubbo-rpc-thrift2
- com.alibaba:dubbo-rpc-memcached
- com.alibaba:dubbo-rpc-redis
- com.alibaba:dubbo-rpc-rest
- com.alibaba:dubbo-filter-validation
- com.alibaba:dubbo-filter-cache
- com.alibaba:dubbo-cluster
- com.alibaba:dubbo-registry-api
- com.alibaba:dubbo-registry-default
- com.alibaba:dubbo-registry-multicast
- com.alibaba:dubbo-registry-zookeeper
- com.alibaba:dubbo-registry-redis
- com.alibaba:dubbo-monitor-api
- com.alibaba:dubbo-monitor-default
- com.alibaba:dubbo-config-api
- com.alibaba:dubbo-config-spring
- com.alibaba:dubbo-container-api
- com.alibaba:dubbo-container-spring
- com.alibaba:dubbo-container-javaconfig
- com.alibaba:dubbo-container-jetty
- com.alibaba:dubbo-container-log4j
- com.alibaba:dubbo-container-logback
-
-
+
+
+ com.alibaba:hessian-lite
+ com.alibaba:dubbo-common
+ com.alibaba:dubbo-remoting-api
+ com.alibaba:dubbo-remoting-netty
+ com.alibaba:dubbo-remoting-mina
+ com.alibaba:dubbo-remoting-grizzly
+ com.alibaba:dubbo-remoting-p2p
+ com.alibaba:dubbo-remoting-http
+ com.alibaba:dubbo-remoting-zookeeper
+ com.alibaba:dubbo-rpc-api
+ com.alibaba:dubbo-rpc-avro
+ com.alibaba:dubbo-rpc-default
+ com.alibaba:dubbo-rpc-injvm
+ com.alibaba:dubbo-rpc-rmi
+ com.alibaba:dubbo-rpc-hessian
+ com.alibaba:dubbo-rpc-http
+ com.alibaba:dubbo-rpc-webservice
+ com.alibaba:dubbo-rpc-thrift
+ com.alibaba:dubbo-rpc-thrift2
+ com.alibaba:dubbo-rpc-memcached
+ com.alibaba:dubbo-rpc-redis
+ com.alibaba:dubbo-rpc-rest
+ com.alibaba:dubbo-filter-validation
+ com.alibaba:dubbo-filter-cache
+ com.alibaba:dubbo-cluster
+ com.alibaba:dubbo-registry-api
+ com.alibaba:dubbo-registry-default
+ com.alibaba:dubbo-registry-multicast
+ com.alibaba:dubbo-registry-zookeeper
+ com.alibaba:dubbo-registry-redis
+ com.alibaba:dubbo-monitor-api
+ com.alibaba:dubbo-monitor-default
+ com.alibaba:dubbo-config-api
+ com.alibaba:dubbo-config-spring
+ com.alibaba:dubbo-container-api
+ com.alibaba:dubbo-container-spring
+ com.alibaba:dubbo-container-javaconfig
+ com.alibaba:dubbo-container-jetty
+ com.alibaba:dubbo-container-log4j
+ com.alibaba:dubbo-container-logback
+
+
From 67b84c5dbb8849cf80a303227a3ab3defb1f3620 Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Thu, 24 Mar 2016 22:45:22 +0800
Subject: [PATCH 11/32] update cxf to 3.0.5 (warning: maybe exists bug!)
---
.../webservice/WebServiceProtocol.java | 115 +++++++++---------
pom.xml | 3 +-
2 files changed, 61 insertions(+), 57 deletions(-)
diff --git a/dubbo-rpc/dubbo-rpc-webservice/src/main/java/com/alibaba/dubbo/rpc/protocol/webservice/WebServiceProtocol.java b/dubbo-rpc/dubbo-rpc-webservice/src/main/java/com/alibaba/dubbo/rpc/protocol/webservice/WebServiceProtocol.java
index 7432aeb824c..2418a271ab8 100644
--- a/dubbo-rpc/dubbo-rpc-webservice/src/main/java/com/alibaba/dubbo/rpc/protocol/webservice/WebServiceProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-webservice/src/main/java/com/alibaba/dubbo/rpc/protocol/webservice/WebServiceProtocol.java
@@ -15,16 +15,15 @@
*/
package com.alibaba.dubbo.rpc.protocol.webservice;
-import java.io.IOException;
-import java.net.SocketTimeoutException;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.dubbo.common.Constants;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.remoting.http.HttpBinder;
+import com.alibaba.dubbo.remoting.http.HttpHandler;
+import com.alibaba.dubbo.remoting.http.HttpServer;
+import com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet;
+import com.alibaba.dubbo.rpc.RpcContext;
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
import org.apache.cxf.bus.extension.ExtensionManagerBus;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
@@ -38,33 +37,34 @@
import org.apache.cxf.transport.servlet.ServletDestinationFactory;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.remoting.http.HttpBinder;
-import com.alibaba.dubbo.remoting.http.HttpHandler;
-import com.alibaba.dubbo.remoting.http.HttpServer;
-import com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet;
-import com.alibaba.dubbo.rpc.RpcContext;
-import com.alibaba.dubbo.rpc.RpcException;
-import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.SocketTimeoutException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
/**
* WebServiceProtocol.
- *
+ *
* @author netcomm
*/
public class WebServiceProtocol extends AbstractProxyProtocol {
-
+
public static final int DEFAULT_PORT = 80;
private final Map serverMap = new ConcurrentHashMap();
-
+
private final ExtensionManagerBus bus = new ExtensionManagerBus();
- private final HTTPTransportFactory transportFactory = new HTTPTransportFactory(bus);
-
+ //private final HTTPTransportFactory transportFactory = new HTTPTransportFactory(bus);//升级cxf到3.0.5后,编译通不过,暂时注掉 -- 杨俊明
+
+ private final HTTPTransportFactory transportFactory = new HTTPTransportFactory();
+
private HttpBinder httpBinder;
-
+
public WebServiceProtocol() {
super(Fault.class);
bus.setExtension(new ServletDestinationFactory(), HttpDestinationFactory.class);
@@ -80,21 +80,21 @@ public int getDefaultPort() {
private class WebServiceHandler implements HttpHandler {
- private volatile ServletController servletController;
+ private volatile ServletController servletController;
public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
- if (servletController == null) {
- HttpServlet httpServlet = DispatcherServlet.getInstance();
- if (httpServlet == null) {
- response.sendError(500, "No such DispatcherServlet instance.");
- return;
- }
- synchronized (this) {
- if (servletController == null) {
- servletController = new ServletController(transportFactory.getRegistry(), httpServlet.getServletConfig(), httpServlet);
- }
- }
- }
+ if (servletController == null) {
+ HttpServlet httpServlet = DispatcherServlet.getInstance();
+ if (httpServlet == null) {
+ response.sendError(500, "No such DispatcherServlet instance.");
+ return;
+ }
+ synchronized (this) {
+ if (servletController == null) {
+ servletController = new ServletController(transportFactory.getRegistry(), httpServlet.getServletConfig(), httpServlet);
+ }
+ }
+ }
RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
servletController.invoke(request, response);
}
@@ -102,7 +102,7 @@ public void handle(HttpServletRequest request, HttpServletResponse response) thr
}
protected Runnable doExport(T impl, Class type, URL url) throws RpcException {
- String addr = url.getIp() + ":" + url.getPort();
+ String addr = url.getIp() + ":" + url.getPort();
HttpServer httpServer = serverMap.get(addr);
if (httpServer == null) {
httpServer = httpBinder.bind(url, new WebServiceHandler());
@@ -110,36 +110,39 @@ protected Runnable doExport(T impl, Class type, URL url) throws RpcExcept
}
final ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
serverFactoryBean.setAddress(url.getAbsolutePath());
- serverFactoryBean.setServiceClass(type);
- serverFactoryBean.setServiceBean(impl);
- serverFactoryBean.setBus(bus);
+ serverFactoryBean.setServiceClass(type);
+ serverFactoryBean.setServiceBean(impl);
+ serverFactoryBean.setBus(bus);
serverFactoryBean.setDestinationFactory(transportFactory);
- serverFactoryBean.create();
+ serverFactoryBean.create();
return new Runnable() {
public void run() {
- serverFactoryBean.destroy();
+ //serverFactoryBean.destroy(); //升级到cxf 3后编译失败,暂时注掉 - 杨俊明
+ if (serverFactoryBean.getServer() != null) {
+ serverFactoryBean.getServer().destroy();
+ }
}
};
}
@SuppressWarnings("unchecked")
protected T doRefer(final Class serviceType, final URL url) throws RpcException {
- ClientProxyFactoryBean proxyFactoryBean = new ClientProxyFactoryBean();
- proxyFactoryBean.setAddress(url.setProtocol("http").toIdentityString());
- proxyFactoryBean.setServiceClass(serviceType);
- proxyFactoryBean.setBus(bus);
- T ref = (T) proxyFactoryBean.create();
- Client proxy = ClientProxy.getClient(ref);
- HTTPConduit conduit = (HTTPConduit) proxy.getConduit();
- HTTPClientPolicy policy = new HTTPClientPolicy();
- policy.setConnectionTimeout(url.getParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT));
- policy.setReceiveTimeout(url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT));
- conduit.setClient(policy);
+ ClientProxyFactoryBean proxyFactoryBean = new ClientProxyFactoryBean();
+ proxyFactoryBean.setAddress(url.setProtocol("http").toIdentityString());
+ proxyFactoryBean.setServiceClass(serviceType);
+ proxyFactoryBean.setBus(bus);
+ T ref = (T) proxyFactoryBean.create();
+ Client proxy = ClientProxy.getClient(ref);
+ HTTPConduit conduit = (HTTPConduit) proxy.getConduit();
+ HTTPClientPolicy policy = new HTTPClientPolicy();
+ policy.setConnectionTimeout(url.getParameter(Constants.CONNECT_TIMEOUT_KEY, Constants.DEFAULT_CONNECT_TIMEOUT));
+ policy.setReceiveTimeout(url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT));
+ conduit.setClient(policy);
return ref;
}
protected int getErrorCode(Throwable e) {
- if (e instanceof Fault) {
+ if (e instanceof Fault) {
e = e.getCause();
}
if (e instanceof SocketTimeoutException) {
diff --git a/pom.xml b/pom.xml
index 5e8284cde0e..2f17be7ac79 100644
--- a/pom.xml
+++ b/pom.xml
@@ -105,7 +105,8 @@
2.5.0
2.1.0
1.3.6
- 2.6.1
+
+ 3.1.5
0.8.0
0.9.3
1.8.0
From 8dd6c42c2e0c2fb160b0693abe45013702daa20f Mon Sep 17 00:00:00 2001
From: yangjunming
Date: Sun, 3 Apr 2016 15:53:58 +0800
Subject: [PATCH 12/32] fix dubbo-admin cannot run in spring lastest version
---
dubbo-admin/pom.xml | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dubbo-admin/pom.xml b/dubbo-admin/pom.xml
index 22d586b7feb..fd075cc5834 100644
--- a/dubbo-admin/pom.xml
+++ b/dubbo-admin/pom.xml
@@ -19,7 +19,8 @@
com.alibaba
dubbo-parent
- 2.5.3
+
+ 2.8.4
dubbo-admin
war
@@ -140,12 +141,17 @@
jetty-maven-plugin
${maven-jetty-plugin_version}
+
+
+ 8080
+
+
exit
- 8080
+ 9090
10
-
- /
+ /${project.artifactId}
+
From e049153457f79d57730fa3fd9ce68a3f0b92a838 Mon Sep 17 00:00:00 2001
From: DonneyYoung
Date: Wed, 15 Jun 2016 13:47:58 +0800
Subject: [PATCH 13/32] bugfix fix hibernate-validator and make zkclient-0.8.1
to zkclient-0.8 update webx to 3.1.6
---
dubbo-admin/pom.xml | 18 ++++++++++++++++--
dubbo-demo/dubbo-demo-consumer/pom.xml | 8 ++++++++
dubbo-demo/dubbo-demo-provider/pom.xml | 8 ++++++++
pom.xml | 24 +++++++++++++++++++++---
4 files changed, 53 insertions(+), 5 deletions(-)
diff --git a/dubbo-admin/pom.xml b/dubbo-admin/pom.xml
index fd075cc5834..aa0c6cd8d8c 100644
--- a/dubbo-admin/pom.xml
+++ b/dubbo-admin/pom.xml
@@ -20,7 +20,7 @@
com.alibaba
dubbo-parent
- 2.8.4
+ 2.8.4a
dubbo-admin
war
@@ -32,7 +32,7 @@
false
false
8.1.15.v20140411
- 3.2.7.RELEASE
+ 3.2.16.RELEASE
@@ -133,9 +133,23 @@
javax.cache
cache-api
+
+ org.apache.velocity
+ velocity
+
+
+
+ org.apache.tomcat.maven
+ tomcat7-maven-plugin
+ 2.2
+
+ 8080
+ /
+
+
org.mortbay.jetty
jetty-maven-plugin
diff --git a/dubbo-demo/dubbo-demo-consumer/pom.xml b/dubbo-demo/dubbo-demo-consumer/pom.xml
index f758b833312..323497c7537 100644
--- a/dubbo-demo/dubbo-demo-consumer/pom.xml
+++ b/dubbo-demo/dubbo-demo-consumer/pom.xml
@@ -143,6 +143,14 @@
org.hibernate
hibernate-validator
+
+ javax.el
+ javax.el-api
+
+
+ org.glassfish.web
+ javax.el
+
javax.cache
cache-api
diff --git a/dubbo-demo/dubbo-demo-provider/pom.xml b/dubbo-demo/dubbo-demo-provider/pom.xml
index 9bb3db3f90d..2b8101b0664 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -149,6 +149,14 @@
org.hibernate
hibernate-validator
+
+ javax.el
+ javax.el-api
+
+
+ org.glassfish.web
+ javax.el
+
javax.cache
cache-api
diff --git a/pom.xml b/pom.xml
index 2f17be7ac79..b6195827a7a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,7 +101,7 @@
0.8
3.4.6
- 0.8.1
+ 0.8
2.5.0
2.1.0
1.3.6
@@ -114,15 +114,18 @@
4.0.7
3.1.0
6.1.26
- 1.0.0.GA
+ 1.1.0.Final
5.2.4.Final
+ 2.2.4
+ 2.2.4
+ 1.7
0.4
2.0-M5.1
3.0
2.2
- 3.0.8
+ 3.1.6
2.7.1
@@ -340,11 +343,26 @@
hibernate-validator
${hibernate_validator_version}
+
+ javax.el
+ javax.el-api
+ ${javax.el-api_version}
+
+
+ org.glassfish.web
+ javax.el
+ ${javax.el_version}
+
javax.cache
cache-api
${jcache_version}
+
+ org.apache.velocity
+ velocity
+ ${velocity_version}
+
org.apache.tuscany.sca
tuscany-sca-api
From b4f10ab61bf10aba21f8cd3cf0560377572ad308 Mon Sep 17 00:00:00 2001
From: sunyaoguan
Date: Thu, 25 Aug 2016 09:38:46 +0800
Subject: [PATCH 14/32] thrift balance
---
.../alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
index cc8a7022a57..6f2082430fe 100644
--- a/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
+++ b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
@@ -5,6 +5,7 @@
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.rpc.RpcException;
import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import org.apache.thrift.TException;
import org.apache.thrift.TProcessor;
import org.apache.thrift.protocol.TCompactProtocol;
import org.apache.thrift.protocol.TProtocol;
@@ -29,6 +30,10 @@ public int getDefaultPort() {
return DEFAULT_PORT;
}
+ public Thrift2Protocol() {
+ super(TException.class,RpcException.class);
+ }
+
@Override
protected Runnable doExport(T impl, Class type, URL url)
throws RpcException {
From 00c39d593125ef0bd0e184bdc268389376ae3436 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Mon, 5 Sep 2016 20:01:46 +0800
Subject: [PATCH 15/32] fix avro load balance bug
---
.../dubbo/rpc/protocol/avro/AvroProtocol.java | 5 +
dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml | 64 ++++++++
.../rpc/protocol/jsonrpc/JsonRpcProtocol.java | 147 ++++++++++++++++++
...com.alibaba.dubbo.remoting.http.HttpBinder | 1 +
.../internal/com.alibaba.dubbo.rpc.Protocol | 1 +
dubbo-rpc/pom.xml | 58 +++----
dubbo/pom.xml | 8 +
7 files changed, 255 insertions(+), 29 deletions(-)
create mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml
create mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java
create mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
create mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
diff --git a/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
index 04b5227fd02..281ae2740b7 100644
--- a/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
@@ -11,6 +11,7 @@
import org.apache.avro.ipc.reflect.ReflectRequestor;
import org.apache.avro.ipc.reflect.ReflectResponder;
+import java.io.IOException;
import java.net.InetSocketAddress;
/**
@@ -21,6 +22,10 @@ public class AvroProtocol extends AbstractProxyProtocol {
public static final int DEFAULT_PORT = 40881;
private static final Logger logger = LoggerFactory.getLogger(AvroProtocol.class);
+ public AvroProtocol() {
+ super(IOException.class, RpcException.class);
+ }
+
public int getDefaultPort() {
return DEFAULT_PORT;
}
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml b/dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml
new file mode 100644
index 00000000000..b87eec095c6
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml
@@ -0,0 +1,64 @@
+
+
+ 4.0.0
+
+ com.alibaba
+ dubbo-rpc
+ 2.8.4a
+
+ dubbo-rpc-jsonrpc
+ jar
+ ${project.artifactId}
+ The jsonrpc module of dubbo project
+
+ true
+ 1.2.0
+
+
+
+ com.alibaba
+ dubbo-rpc-api
+ ${project.parent.version}
+
+
+
+ com.github.briandilley.jsonrpc4j
+ jsonrpc4j
+ ${jsonrpc_version}
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+ provided
+
+
+
+ org.apache.thrift
+ libthrift
+ 0.9.3
+
+
+ org.apache.httpcomponents
+ httpcore
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java
new file mode 100644
index 00000000000..966e1f6f3aa
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java
@@ -0,0 +1,147 @@
+package com.alibaba.dubbo.rpc.protocol.jsonrpc;
+
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.remoting.http.HttpBinder;
+import com.alibaba.dubbo.remoting.http.HttpHandler;
+import com.alibaba.dubbo.remoting.http.HttpServer;
+import com.alibaba.dubbo.rpc.RpcContext;
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import com.googlecode.jsonrpc4j.HttpException;
+import com.googlecode.jsonrpc4j.JsonRpcClientException;
+import com.googlecode.jsonrpc4j.JsonRpcServer;
+import com.googlecode.jsonrpc4j.spring.JsonProxyFactoryBean;
+import org.springframework.remoting.RemoteAccessException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.SocketTimeoutException;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Created by wuwen on 15/4/1.
+ */
+public class JsonRpcProtocol extends AbstractProxyProtocol {
+
+ public static final String ACCESS_CONTROL_ALLOW_ORIGIN_HEADER = "Access-Control-Allow-Origin";
+ public static final String ACCESS_CONTROL_ALLOW_METHODS_HEADER = "Access-Control-Allow-Methods";
+ public static final String ACCESS_CONTROL_ALLOW_HEADERS_HEADER = "Access-Control-Allow-Headers";
+
+ private final Map serverMap = new ConcurrentHashMap<>();
+
+ private final Map skeletonMap = new ConcurrentHashMap<>();
+
+ private HttpBinder httpBinder;
+
+ public JsonRpcProtocol() {
+ super(HttpException.class, JsonRpcClientException.class);
+ }
+
+ public void setHttpBinder(HttpBinder httpBinder) {
+ this.httpBinder = httpBinder;
+ }
+
+ public int getDefaultPort() {
+ return 80;
+ }
+
+ private class InternalHandler implements HttpHandler {
+
+ private boolean cors;
+
+ public InternalHandler(boolean cors) {
+ this.cors = cors;
+ }
+
+ public void handle(HttpServletRequest request, HttpServletResponse response)
+ throws IOException, ServletException {
+ String uri = request.getRequestURI();
+ JsonRpcServer skeleton = skeletonMap.get(uri);
+ if (cors) {
+ response.setHeader(ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, "*");
+ response.setHeader(ACCESS_CONTROL_ALLOW_METHODS_HEADER, "POST");
+ response.setHeader(ACCESS_CONTROL_ALLOW_HEADERS_HEADER, "*");
+ }
+ if (request.getMethod().equalsIgnoreCase("OPTIONS")) {
+ response.setStatus(200);
+ } else if (request.getMethod().equalsIgnoreCase("POST")) {
+
+ RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
+ try {
+ skeleton.handle(request.getInputStream(), response.getOutputStream());
+ } catch (Throwable e) {
+ throw new ServletException(e);
+ }
+ } else {
+ response.setStatus(500);
+ }
+ }
+
+ }
+
+ protected Runnable doExport(T impl, Class type, URL url) throws RpcException {
+ String addr = url.getIp() + ":" + url.getPort();
+ HttpServer server = serverMap.get(addr);
+ if (server == null) {
+ server = httpBinder.bind(url, new InternalHandler(url.getParameter("cors", false)));
+ serverMap.put(addr, server);
+ }
+ final String path = url.getAbsolutePath();
+ JsonRpcServer skeleton = new JsonRpcServer(impl, type);
+ skeletonMap.put(path, skeleton);
+ return new Runnable() {
+ public void run() {
+ skeletonMap.remove(path);
+ }
+ };
+ }
+
+ @SuppressWarnings("unchecked")
+ protected T doRefer(final Class serviceType, URL url) throws RpcException {
+ JsonProxyFactoryBean jsonProxyFactoryBean = new JsonProxyFactoryBean();
+ jsonProxyFactoryBean.setServiceUrl(url.setProtocol("http").toIdentityString());
+ jsonProxyFactoryBean.setServiceInterface(serviceType);
+
+ jsonProxyFactoryBean.afterPropertiesSet();
+ return (T) jsonProxyFactoryBean.getObject();
+ }
+
+ protected int getErrorCode(Throwable e) {
+ if (e instanceof RemoteAccessException) {
+ e = e.getCause();
+ }
+ if (e != null) {
+ Class> cls = e.getClass();
+ if (SocketTimeoutException.class.equals(cls)) {
+ return RpcException.TIMEOUT_EXCEPTION;
+ } else if (IOException.class.isAssignableFrom(cls)) {
+ return RpcException.NETWORK_EXCEPTION;
+ } else if (ClassNotFoundException.class.isAssignableFrom(cls)) {
+ return RpcException.SERIALIZATION_EXCEPTION;
+ }
+ }
+ return super.getErrorCode(e);
+ }
+
+ public void destroy() {
+ super.destroy();
+ for (String key : new ArrayList<>(serverMap.keySet())) {
+ HttpServer server = serverMap.remove(key);
+ if (server != null) {
+ try {
+ if (logger.isInfoEnabled()) {
+ logger.info("Close jsonrpc server " + server.getUrl());
+ }
+ server.close();
+ } catch (Throwable t) {
+ logger.warn(t.getMessage(), t);
+ }
+ }
+ }
+ }
+
+}
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
new file mode 100644
index 00000000000..8b2b2a5b2d1
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
@@ -0,0 +1 @@
+jetty9=com.doctor.dubbo.remoting.http.jetty.JettyHttpBinder
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
new file mode 100644
index 00000000000..a9b1809dfe3
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
@@ -0,0 +1 @@
+jsonrpc=com.ofpay.dubbo.rpc.protocol.jsonrpc.JsonRpcProtocol
\ No newline at end of file
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index 580b8436f48..1cef7e68615 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -14,33 +14,33 @@
- limitations under the License.
-->
- 4.0.0
-
- com.alibaba
- dubbo-parent
- 2.8.4a
-
- dubbo-rpc
- pom
- ${project.artifactId}
- The rpc module of dubbo project
-
- true
-
-
- dubbo-rpc-api
- dubbo-rpc-avro
- dubbo-rpc-default
- dubbo-rpc-injvm
- dubbo-rpc-rmi
- dubbo-rpc-hessian
- dubbo-rpc-http
- dubbo-rpc-webservice
- dubbo-rpc-thrift
- dubbo-rpc-thrift2
- dubbo-rpc-memcached
- dubbo-rpc-redis
- dubbo-rpc-rest
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+
+ com.alibaba
+ dubbo-parent
+ 2.8.4a
+
+ dubbo-rpc
+ pom
+ ${project.artifactId}
+ The rpc module of dubbo project
+
+ true
+
+
+ dubbo-rpc-api
+ dubbo-rpc-avro
+ dubbo-rpc-default
+ dubbo-rpc-injvm
+ dubbo-rpc-rmi
+ dubbo-rpc-hessian
+ dubbo-rpc-http
+ dubbo-rpc-webservice
+ dubbo-rpc-thrift
+ dubbo-rpc-thrift2
+ dubbo-rpc-memcached
+ dubbo-rpc-redis
+ dubbo-rpc-rest
+
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index 91f09475ad3..af7bf55a66d 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -29,6 +29,14 @@
false
+
+
+
+ nexus-3rd
+ http://localhost:8081/nexus/content/repositories/thirdparty/
+
+
+
com.alibaba
From 84042491fe02b2e38cb8e0b190ec6ed4681599b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Mon, 5 Sep 2016 20:03:34 +0800
Subject: [PATCH 16/32] fix avro-protocal load balance bug
---
dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml | 64 --------
.../rpc/protocol/jsonrpc/JsonRpcProtocol.java | 147 ------------------
...com.alibaba.dubbo.remoting.http.HttpBinder | 1 -
.../internal/com.alibaba.dubbo.rpc.Protocol | 1 -
4 files changed, 213 deletions(-)
delete mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml
delete mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java
delete mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
delete mode 100644 dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml b/dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml
deleted file mode 100644
index b87eec095c6..00000000000
--- a/dubbo-rpc/dubbo-rpc-jsonrpc/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
- 4.0.0
-
- com.alibaba
- dubbo-rpc
- 2.8.4a
-
- dubbo-rpc-jsonrpc
- jar
- ${project.artifactId}
- The jsonrpc module of dubbo project
-
- true
- 1.2.0
-
-
-
- com.alibaba
- dubbo-rpc-api
- ${project.parent.version}
-
-
-
- com.github.briandilley.jsonrpc4j
- jsonrpc4j
- ${jsonrpc_version}
-
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
- provided
-
-
-
- org.apache.thrift
- libthrift
- 0.9.3
-
-
- org.apache.httpcomponents
- httpcore
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java
deleted file mode 100644
index 966e1f6f3aa..00000000000
--- a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/java/com/alibaba/dubbo/rpc/protocol/jsonrpc/JsonRpcProtocol.java
+++ /dev/null
@@ -1,147 +0,0 @@
-package com.alibaba.dubbo.rpc.protocol.jsonrpc;
-
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.remoting.http.HttpBinder;
-import com.alibaba.dubbo.remoting.http.HttpHandler;
-import com.alibaba.dubbo.remoting.http.HttpServer;
-import com.alibaba.dubbo.rpc.RpcContext;
-import com.alibaba.dubbo.rpc.RpcException;
-import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
-import com.googlecode.jsonrpc4j.HttpException;
-import com.googlecode.jsonrpc4j.JsonRpcClientException;
-import com.googlecode.jsonrpc4j.JsonRpcServer;
-import com.googlecode.jsonrpc4j.spring.JsonProxyFactoryBean;
-import org.springframework.remoting.RemoteAccessException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.net.SocketTimeoutException;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Created by wuwen on 15/4/1.
- */
-public class JsonRpcProtocol extends AbstractProxyProtocol {
-
- public static final String ACCESS_CONTROL_ALLOW_ORIGIN_HEADER = "Access-Control-Allow-Origin";
- public static final String ACCESS_CONTROL_ALLOW_METHODS_HEADER = "Access-Control-Allow-Methods";
- public static final String ACCESS_CONTROL_ALLOW_HEADERS_HEADER = "Access-Control-Allow-Headers";
-
- private final Map serverMap = new ConcurrentHashMap<>();
-
- private final Map skeletonMap = new ConcurrentHashMap<>();
-
- private HttpBinder httpBinder;
-
- public JsonRpcProtocol() {
- super(HttpException.class, JsonRpcClientException.class);
- }
-
- public void setHttpBinder(HttpBinder httpBinder) {
- this.httpBinder = httpBinder;
- }
-
- public int getDefaultPort() {
- return 80;
- }
-
- private class InternalHandler implements HttpHandler {
-
- private boolean cors;
-
- public InternalHandler(boolean cors) {
- this.cors = cors;
- }
-
- public void handle(HttpServletRequest request, HttpServletResponse response)
- throws IOException, ServletException {
- String uri = request.getRequestURI();
- JsonRpcServer skeleton = skeletonMap.get(uri);
- if (cors) {
- response.setHeader(ACCESS_CONTROL_ALLOW_ORIGIN_HEADER, "*");
- response.setHeader(ACCESS_CONTROL_ALLOW_METHODS_HEADER, "POST");
- response.setHeader(ACCESS_CONTROL_ALLOW_HEADERS_HEADER, "*");
- }
- if (request.getMethod().equalsIgnoreCase("OPTIONS")) {
- response.setStatus(200);
- } else if (request.getMethod().equalsIgnoreCase("POST")) {
-
- RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
- try {
- skeleton.handle(request.getInputStream(), response.getOutputStream());
- } catch (Throwable e) {
- throw new ServletException(e);
- }
- } else {
- response.setStatus(500);
- }
- }
-
- }
-
- protected Runnable doExport(T impl, Class type, URL url) throws RpcException {
- String addr = url.getIp() + ":" + url.getPort();
- HttpServer server = serverMap.get(addr);
- if (server == null) {
- server = httpBinder.bind(url, new InternalHandler(url.getParameter("cors", false)));
- serverMap.put(addr, server);
- }
- final String path = url.getAbsolutePath();
- JsonRpcServer skeleton = new JsonRpcServer(impl, type);
- skeletonMap.put(path, skeleton);
- return new Runnable() {
- public void run() {
- skeletonMap.remove(path);
- }
- };
- }
-
- @SuppressWarnings("unchecked")
- protected T doRefer(final Class serviceType, URL url) throws RpcException {
- JsonProxyFactoryBean jsonProxyFactoryBean = new JsonProxyFactoryBean();
- jsonProxyFactoryBean.setServiceUrl(url.setProtocol("http").toIdentityString());
- jsonProxyFactoryBean.setServiceInterface(serviceType);
-
- jsonProxyFactoryBean.afterPropertiesSet();
- return (T) jsonProxyFactoryBean.getObject();
- }
-
- protected int getErrorCode(Throwable e) {
- if (e instanceof RemoteAccessException) {
- e = e.getCause();
- }
- if (e != null) {
- Class> cls = e.getClass();
- if (SocketTimeoutException.class.equals(cls)) {
- return RpcException.TIMEOUT_EXCEPTION;
- } else if (IOException.class.isAssignableFrom(cls)) {
- return RpcException.NETWORK_EXCEPTION;
- } else if (ClassNotFoundException.class.isAssignableFrom(cls)) {
- return RpcException.SERIALIZATION_EXCEPTION;
- }
- }
- return super.getErrorCode(e);
- }
-
- public void destroy() {
- super.destroy();
- for (String key : new ArrayList<>(serverMap.keySet())) {
- HttpServer server = serverMap.remove(key);
- if (server != null) {
- try {
- if (logger.isInfoEnabled()) {
- logger.info("Close jsonrpc server " + server.getUrl());
- }
- server.close();
- } catch (Throwable t) {
- logger.warn(t.getMessage(), t);
- }
- }
- }
- }
-
-}
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
deleted file mode 100644
index 8b2b2a5b2d1..00000000000
--- a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
+++ /dev/null
@@ -1 +0,0 @@
-jetty9=com.doctor.dubbo.remoting.http.jetty.JettyHttpBinder
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
deleted file mode 100644
index a9b1809dfe3..00000000000
--- a/dubbo-rpc/dubbo-rpc-jsonrpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
+++ /dev/null
@@ -1 +0,0 @@
-jsonrpc=com.ofpay.dubbo.rpc.protocol.jsonrpc.JsonRpcProtocol
\ No newline at end of file
From 53ff79d3a26a56ff8f261947c2c748c432c93890 Mon Sep 17 00:00:00 2001
From: yjmyzz
Date: Mon, 5 Sep 2016 23:36:19 +0800
Subject: [PATCH 17/32] add upload-to-nexus config sample
---
dubbo/dependency-reduced-pom.xml | 380 ++++++++
dubbo/pom.xml | 152 ++--
pom.xml | 1439 +++++++++++++++---------------
3 files changed, 1188 insertions(+), 783 deletions(-)
create mode 100644 dubbo/dependency-reduced-pom.xml
diff --git a/dubbo/dependency-reduced-pom.xml b/dubbo/dependency-reduced-pom.xml
new file mode 100644
index 00000000000..11f3c20dd91
--- /dev/null
+++ b/dubbo/dependency-reduced-pom.xml
@@ -0,0 +1,380 @@
+
+
+
+ dubbo-parent
+ com.alibaba
+ 2.8.4a
+
+ 4.0.0
+ dubbo
+ ${project.artifactId}
+ The all in one project of dubbo
+
+
+
+ maven-source-plugin
+
+
+ attach-sources
+ package
+
+ jar-no-fork
+
+
+
+
+
+ maven-javadoc-plugin
+ 2.10.3
+
+
+ attach-javadoc
+ deploy
+
+ jar
+
+
+
+
+ public
+ UTF-8
+ UTF-8
+ UTF-8
+ com.alibaba.com.*
+
+ http://docs.oracle.com/javase/6/docs/api
+
+
+
+
+ maven-shade-plugin
+ 1.4
+
+
+ package
+
+ shade
+
+
+ true
+ true
+
+
+ com.alibaba:hessian-lite
+ com.alibaba:dubbo-common
+ com.alibaba:dubbo-remoting-api
+ com.alibaba:dubbo-remoting-netty
+ com.alibaba:dubbo-remoting-mina
+ com.alibaba:dubbo-remoting-grizzly
+ com.alibaba:dubbo-remoting-p2p
+ com.alibaba:dubbo-remoting-http
+ com.alibaba:dubbo-remoting-zookeeper
+ com.alibaba:dubbo-rpc-api
+ com.alibaba:dubbo-rpc-avro
+ com.alibaba:dubbo-rpc-default
+ com.alibaba:dubbo-rpc-injvm
+ com.alibaba:dubbo-rpc-rmi
+ com.alibaba:dubbo-rpc-hessian
+ com.alibaba:dubbo-rpc-http
+ com.alibaba:dubbo-rpc-webservice
+ com.alibaba:dubbo-rpc-thrift
+ com.alibaba:dubbo-rpc-thrift2
+ com.alibaba:dubbo-rpc-memcached
+ com.alibaba:dubbo-rpc-redis
+ com.alibaba:dubbo-rpc-rest
+ com.alibaba:dubbo-filter-validation
+ com.alibaba:dubbo-filter-cache
+ com.alibaba:dubbo-cluster
+ com.alibaba:dubbo-registry-api
+ com.alibaba:dubbo-registry-default
+ com.alibaba:dubbo-registry-multicast
+ com.alibaba:dubbo-registry-zookeeper
+ com.alibaba:dubbo-registry-redis
+ com.alibaba:dubbo-monitor-api
+ com.alibaba:dubbo-monitor-default
+ com.alibaba:dubbo-config-api
+ com.alibaba:dubbo-config-spring
+ com.alibaba:dubbo-container-api
+ com.alibaba:dubbo-container-spring
+ com.alibaba:dubbo-container-javaconfig
+ com.alibaba:dubbo-container-jetty
+ com.alibaba:dubbo-container-log4j
+ com.alibaba:dubbo-container-logback
+
+
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.extension.ExtensionFactory
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.threadpool.ThreadPool
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Dispatcher
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Codec2
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Transporter
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.exchange.Exchanger
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.p2p.Networker
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.telnet.TelnetHandler
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Filter
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.InvokerListener
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ExporterListener
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ProxyFactory
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Cluster
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.LoadBalance
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Merger
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.RouterFactory
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.ConfiguratorFactory
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.container.Container
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.container.page.PageHandler
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.monitor.MonitorFactory
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.validation.Validation
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.cache.CacheFactory
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.store.DataStore
+
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.logger.LoggerAdapter
+
+
+
+
+
+
+
+
+
+
+ org.springframework
+ spring-beans
+ 4.2.4.RELEASE
+ compile
+
+
+ org.springframework
+ spring-core
+ 4.2.4.RELEASE
+ compile
+
+
+ org.springframework
+ spring-context
+ 4.2.4.RELEASE
+ compile
+
+
+ org.springframework
+ spring-aop
+ 4.2.4.RELEASE
+ compile
+
+
+ aopalliance
+ aopalliance
+ 1.0
+ compile
+
+
+ org.springframework
+ spring-expression
+ 4.2.4.RELEASE
+ compile
+
+
+ io.netty
+ netty
+ 3.9.9.Final
+ compile
+
+
+ log4j
+ log4j
+ 1.2.17
+ compile
+
+
+ org.apache.logging.log4j
+ log4j-core
+ 2.5
+ compile
+
+
+ org.apache.logging.log4j
+ log4j-api
+ 2.5
+ compile
+
+
+ org.javassist
+ javassist
+ 3.15.0-GA
+ compile
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+ compile
+
+
+ org.springframework
+ spring-web
+ 4.2.4.RELEASE
+ compile
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.15
+ compile
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.3.4
+ compile
+
+
+ org.apache.httpcomponents
+ httpcore
+ 4.3.2
+ compile
+
+
+ commons-logging
+ commons-logging
+ 1.1.3
+ compile
+
+
+ commons-codec
+ commons-codec
+ 1.6
+ compile
+
+
+ commons-lang
+ commons-lang
+ 2.6
+ compile
+
+
+ commons-pool
+ commons-pool
+ 1.6
+ compile
+
+
+ com.101tec
+ zkclient
+ 0.8
+ compile
+
+
+ zookeeper
+ org.apache.zookeeper
+
+
+
+
+ org.slf4j
+ slf4j-log4j12
+ 1.7.15
+ compile
+
+
+ org.apache.curator
+ curator-framework
+ 2.5.0
+ compile
+
+
+ zookeeper
+ org.apache.zookeeper
+
+
+
+
+ org.apache.curator
+ curator-client
+ 2.5.0
+ compile
+
+
+ zookeeper
+ org.apache.zookeeper
+
+
+
+
+ com.google.guava
+ guava
+ 16.0.1
+ compile
+
+
+
+ false
+
+
+
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index af7bf55a66d..6331409f3df 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -29,13 +29,6 @@
false
-
-
-
- nexus-3rd
- http://localhost:8081/nexus/content/repositories/thirdparty/
-
-
@@ -404,70 +397,76 @@
true
true
-
-
- com.alibaba:hessian-lite
- com.alibaba:dubbo-common
- com.alibaba:dubbo-remoting-api
- com.alibaba:dubbo-remoting-netty
- com.alibaba:dubbo-remoting-mina
- com.alibaba:dubbo-remoting-grizzly
- com.alibaba:dubbo-remoting-p2p
- com.alibaba:dubbo-remoting-http
- com.alibaba:dubbo-remoting-zookeeper
- com.alibaba:dubbo-rpc-api
- com.alibaba:dubbo-rpc-avro
- com.alibaba:dubbo-rpc-default
- com.alibaba:dubbo-rpc-injvm
- com.alibaba:dubbo-rpc-rmi
- com.alibaba:dubbo-rpc-hessian
- com.alibaba:dubbo-rpc-http
- com.alibaba:dubbo-rpc-webservice
- com.alibaba:dubbo-rpc-thrift
- com.alibaba:dubbo-rpc-thrift2
- com.alibaba:dubbo-rpc-memcached
- com.alibaba:dubbo-rpc-redis
- com.alibaba:dubbo-rpc-rest
- com.alibaba:dubbo-filter-validation
- com.alibaba:dubbo-filter-cache
- com.alibaba:dubbo-cluster
- com.alibaba:dubbo-registry-api
- com.alibaba:dubbo-registry-default
- com.alibaba:dubbo-registry-multicast
- com.alibaba:dubbo-registry-zookeeper
- com.alibaba:dubbo-registry-redis
- com.alibaba:dubbo-monitor-api
- com.alibaba:dubbo-monitor-default
- com.alibaba:dubbo-config-api
- com.alibaba:dubbo-config-spring
- com.alibaba:dubbo-container-api
- com.alibaba:dubbo-container-spring
- com.alibaba:dubbo-container-javaconfig
- com.alibaba:dubbo-container-jetty
- com.alibaba:dubbo-container-log4j
- com.alibaba:dubbo-container-logback
-
-
+
+
+ com.alibaba:hessian-lite
+ com.alibaba:dubbo-common
+ com.alibaba:dubbo-remoting-api
+ com.alibaba:dubbo-remoting-netty
+ com.alibaba:dubbo-remoting-mina
+ com.alibaba:dubbo-remoting-grizzly
+ com.alibaba:dubbo-remoting-p2p
+ com.alibaba:dubbo-remoting-http
+ com.alibaba:dubbo-remoting-zookeeper
+ com.alibaba:dubbo-rpc-api
+ com.alibaba:dubbo-rpc-avro
+ com.alibaba:dubbo-rpc-default
+ com.alibaba:dubbo-rpc-injvm
+ com.alibaba:dubbo-rpc-rmi
+ com.alibaba:dubbo-rpc-hessian
+ com.alibaba:dubbo-rpc-http
+ com.alibaba:dubbo-rpc-webservice
+ com.alibaba:dubbo-rpc-thrift
+ com.alibaba:dubbo-rpc-thrift2
+ com.alibaba:dubbo-rpc-memcached
+ com.alibaba:dubbo-rpc-redis
+ com.alibaba:dubbo-rpc-rest
+ com.alibaba:dubbo-filter-validation
+ com.alibaba:dubbo-filter-cache
+ com.alibaba:dubbo-cluster
+ com.alibaba:dubbo-registry-api
+ com.alibaba:dubbo-registry-default
+ com.alibaba:dubbo-registry-multicast
+ com.alibaba:dubbo-registry-zookeeper
+ com.alibaba:dubbo-registry-redis
+ com.alibaba:dubbo-monitor-api
+ com.alibaba:dubbo-monitor-default
+ com.alibaba:dubbo-config-api
+ com.alibaba:dubbo-config-spring
+ com.alibaba:dubbo-container-api
+ com.alibaba:dubbo-container-spring
+ com.alibaba:dubbo-container-javaconfig
+ com.alibaba:dubbo-container-jetty
+ com.alibaba:dubbo-container-log4j
+ com.alibaba:dubbo-container-logback
+
+
- META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler
+
- META-INF/dubbo/internal/com.alibaba.dubbo.common.extension.ExtensionFactory
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.extension.ExtensionFactory
+
- META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization
+
- META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker
+
- META-INF/dubbo/internal/com.alibaba.dubbo.common.threadpool.ThreadPool
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.threadpool.ThreadPool
+
@@ -483,23 +482,29 @@
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.exchange.Exchanger
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.exchange.Exchanger
+
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
+
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.p2p.Networker
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.p2p.Networker
+
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.telnet.TelnetHandler
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.telnet.TelnetHandler
+
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter
+
@@ -527,7 +532,8 @@
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.LoadBalance
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.LoadBalance
+
@@ -535,11 +541,14 @@
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.RouterFactory
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.RouterFactory
+
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.ConfiguratorFactory
+
+ META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.ConfiguratorFactory
+
@@ -547,15 +556,18 @@
- META-INF/dubbo/internal/com.alibaba.dubbo.container.page.PageHandler
+ META-INF/dubbo/internal/com.alibaba.dubbo.container.page.PageHandler
+
- META-INF/dubbo/internal/com.alibaba.dubbo.monitor.MonitorFactory
+ META-INF/dubbo/internal/com.alibaba.dubbo.monitor.MonitorFactory
+
- META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory
+ META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory
+
@@ -567,11 +579,13 @@
- META-INF/dubbo/internal/com.alibaba.dubbo.common.store.DataStore
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.store.DataStore
+
- META-INF/dubbo/internal/com.alibaba.dubbo.common.logger.LoggerAdapter
+ META-INF/dubbo/internal/com.alibaba.dubbo.common.logger.LoggerAdapter
+
diff --git a/pom.xml b/pom.xml
index b6195827a7a..1b6ab3ec3e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,456 +14,457 @@
- limitations under the License.
-->
- 4.0.0
- com.alibaba
- dubbo-parent
- 2.8.4a
- pom
- ${project.artifactId}
- The parent project of dubbo
- http://code.alibabatech.com/wiki/display/dubbo
- 2011
-
-
- Apache 2
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
- A business-friendly OSS license
-
-
-
- Alibaba
- http://www.alibaba.com
-
-
- dubbo-common
- dubbo-container
- dubbo-remoting
- dubbo-rpc
- dubbo-filter
- dubbo-cluster
- dubbo-registry
- dubbo-monitor
- dubbo-config
- dubbo
- dubbo-simple
- dubbo-admin
- dubbo-demo
- hessian-lite
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+ com.alibaba
+ dubbo-parent
+ 2.8.4a
+ pom
+ ${project.artifactId}
+ The parent project of dubbo
+ http://code.alibabatech.com/wiki/display/dubbo
+ 2011
+
+
+ Apache 2
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ repo
+ A business-friendly OSS license
+
+
+
+ Alibaba
+ http://www.alibaba.com
+
+
+ dubbo-common
+ dubbo-container
+ dubbo-remoting
+ dubbo-rpc
+ dubbo-filter
+ dubbo-cluster
+ dubbo-registry
+ dubbo-monitor
+ dubbo-config
+ dubbo
+ dubbo-simple
+ dubbo-admin
+ dubbo-demo
+ hessian-lite
-
-
-
- test
-
-
- .project
-
-
-
- dubbo-test
-
-
-
- hudson
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- true
-
-
-
-
-
-
-
-
-
- 4.2.4.RELEASE
- 3.15.0-GA
-
- 3.9.9.Final
- 1.1.7
-
- 2.1.4
-
- 4.3.4
- 3.2.1-fixed-2
-
- 1.4.8
-
- 1.2.6
- 3.1
- 0.8
- 3.4.6
-
- 0.8
- 2.5.0
- 2.1.0
- 1.3.6
-
- 3.1.5
- 0.8.0
- 0.9.3
- 1.8.0
- 1.0.13
- 4.0.7
- 3.1.0
- 6.1.26
- 1.1.0.Final
-
- 5.2.4.Final
- 2.2.4
- 2.2.4
- 1.7
- 0.4
- 2.0-M5.1
- 3.0
- 2.2
-
- 3.1.6
+
+
+
+ test
+
+
+ .project
+
+
+
+ dubbo-test
+
+
+
+ hudson
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+
+
+
+
+
+
+
+
+
+ 4.2.4.RELEASE
+ 3.15.0-GA
+
+ 3.9.9.Final
+ 1.1.7
+
+ 2.1.4
+
+ 4.3.4
+ 3.2.1-fixed-2
+
+ 1.4.8
+
+ 1.2.6
+ 3.1
+ 0.8
+ 3.4.6
+
+ 0.8
+ 2.5.0
+ 2.1.0
+ 1.3.6
+
+ 3.1.5
+ 0.8.0
+ 0.9.3
+ 1.8.0
+ 1.0.13
+ 4.0.7
+ 3.1.0
+ 6.1.26
+ 1.1.0.Final
+
+ 5.2.4.Final
+ 2.2.4
+ 2.2.4
+ 1.7
+ 0.4
+ 2.0-M5.1
+ 3.0
+ 2.2
+
+ 3.1.6
- 2.7.1
+ 2.7.1
1.6
- 2.6
+ 2.6
8.0.11
-
-
- 1.7.15
- 1.1
-
- 1.2.17
-
- 1.1.5
- 2.5
-
- 4.10
- 3.0
- 0.999.8
+
+
+ 1.7.15
+ 1.1
+
+ 1.2.17
+
+ 1.1.5
+ 2.5
+
+ 4.10
+ 3.0
+ 0.999.8
-
- 2.0.1
- 3.0.9.Final
- 3.0.16.Final
- 3.0.14.Final
- 3.0.14.Final
- 3.0.14.Final
- 3.0.16.Final
- 2.24.0
- 0.37
- 2.44
+
+ 2.0.1
+ 3.0.9.Final
+ 3.0.16.Final
+ 3.0.14.Final
+ 3.0.14.Final
+ 3.0.14.Final
+ 3.0.16.Final
+ 2.24.0
+ 0.37
+ 2.44
-
-
- false
- true
- ${file_encoding}
+
+
+ false
+ true
+ ${file_encoding}
-
- Copyright 1999-2012 Alibaba Group.
Licensed under
- the Apache License, Version 2.0 (the "License");
you
- may not use this file except in compliance with the License.
You
- may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
Unless required
- by applicable law or agreed to in writing, software
distributed
- under the License is distributed on an "AS IS"
- BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
- express or implied.
See the License for the specific language
- governing permissions and
limitations under the License.
- oss
+
+ Copyright 1999-2012 Alibaba Group.
Licensed under
+ the Apache License, Version 2.0 (the "License");
you
+ may not use this file except in compliance with the License.
You
+ may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
Unless required
+ by applicable law or agreed to in writing, software
distributed
+ under the License is distributed on an "AS IS"
+ BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+ express or implied.
See the License for the specific language
+ governing permissions and
limitations under the License.
+
+ oss
-
- 2.3.2
- 1.6
- 1.6
- UTF-8
+
+ 2.3.2
+ 1.6
+ 1.6
+ UTF-8
- 2.1.1
- 2.3.2
- 2.1.1
- 2.3.1
- 2.7
+ 2.1.1
+ 2.3.2
+ 2.1.1
+ 2.3.1
+ 2.7
2.17
- 8.1.15.v20140411
- 1.8.0
+ 8.1.15.v20140411
+ 1.8.0
-
-
-
-
-
- org.springframework
- spring-framework-bom
- ${spring.bom.version}
- pom
- import
-
-
- org.javassist
- javassist
- ${javassist_version}
-
-
- io.netty
- netty
- ${netty_version}
-
-
- org.apache.mina
- mina-core
- ${mina_version}
-
-
- org.glassfish.grizzly
- grizzly-core
- ${grizzly_version}
-
-
- org.apache.httpcomponents
- httpclient
- ${httpclient_version}
-
-
- com.alibaba
- hessian-lite
- ${hessian_lite_version}
-
-
- com.alibaba
- fastjson
- ${fastjson_version}
-
-
- com.thoughtworks.xstream
- xstream
- ${xstream_version}
-
-
- org.apache.bsf
- bsf-api
- ${bsf_version}
-
-
- org.jvnet.sorcerer
- sorcerer-javac
- ${sorcerer_version}
-
-
- org.apache.zookeeper
- zookeeper
- ${zookeeper_version}
-
-
- com.101tec
- zkclient
- ${zkclient_version}
-
-
-
-
-
-
-
-
-
-
-
- org.apache.curator
- curator-framework
- ${curator_version}
-
-
- redis.clients
- jedis
- ${jedis_version}
-
-
- com.googlecode.xmemcached
- xmemcached
- ${xmemcached_version}
-
-
- org.apache.cxf
- cxf-rt-frontend-simple
- ${cxf_version}
-
-
- org.apache.cxf
- cxf-rt-transports-http
- ${cxf_version}
-
-
- org.apache.thrift
- libthrift
- ${thrift_version}
-
-
- org.apache.avro
- avro
- ${avro_version}
-
-
- org.apache.avro
- avro-ipc
- ${avro_version}
-
-
- jfree
- jfreechart
- ${jfreechart_version}
-
-
- com.caucho
- hessian
- ${hessian_version}
-
-
- javax.servlet
- javax.servlet-api
- ${servlet_version}
-
-
- org.mortbay.jetty
- jetty
- ${jetty_version}
-
-
- javax.validation
- validation-api
- ${validation_version}
-
-
- org.hibernate
- hibernate-validator
- ${hibernate_validator_version}
-
-
- javax.el
- javax.el-api
- ${javax.el-api_version}
-
-
- org.glassfish.web
- javax.el
- ${javax.el_version}
-
-
- javax.cache
- cache-api
- ${jcache_version}
-
-
- org.apache.velocity
- velocity
- ${velocity_version}
-
-
- org.apache.tuscany.sca
- tuscany-sca-api
- ${sca_version}
-
-
- com.google.inject
- guice
- ${guice_version}
-
-
- com.alibaba.citrus
- citrus-webx-all
- ${webx_version}
-
-
- com.fasterxml.jackson.core
- jackson-core
- ${jackson_version}
-
-
- com.fasterxml.jackson.core
- jackson-databind
- ${jackson_version}
-
-
-
- org.slf4j
- slf4j-api
- ${slf4j_version}
-
-
- org.slf4j
- slf4j-log4j12
- ${slf4j_version}
-
-
- commons-logging
- commons-logging-api
- ${jcl_version}
-
-
- log4j
- log4j
- ${log4j_version}
-
-
- ch.qos.logback
- logback-classic
- ${logback_version}
-
-
- org.apache.logging.log4j
- log4j-core
- ${log4j2_version}
-
-
- org.apache.logging.log4j
- log4j-slf4j-impl
- ${log4j2_version}
-
-
-
- junit
- junit
- ${junit_version}
- test
-
-
- org.easymock
- easymock
- ${easymock_version}
- test
-
-
- com.googlecode.jmockit
- jmockit
- ${jmockit_version}
- test
-
-
- org.easymock
- easymockclassextension
- ${easymock_version}
- test
-
-
- cglib
- cglib-nodep
- ${cglib_version}
-
-
- commons-lang
- commons-lang
- ${commons-lang_version}
-
-
- commons-pool
- commons-pool
- ${commons_pool_version}
-
+
+
+
+
+
+ org.springframework
+ spring-framework-bom
+ ${spring.bom.version}
+ pom
+ import
+
+
+ org.javassist
+ javassist
+ ${javassist_version}
+
+
+ io.netty
+ netty
+ ${netty_version}
+
+
+ org.apache.mina
+ mina-core
+ ${mina_version}
+
+
+ org.glassfish.grizzly
+ grizzly-core
+ ${grizzly_version}
+
+
+ org.apache.httpcomponents
+ httpclient
+ ${httpclient_version}
+
+
+ com.alibaba
+ hessian-lite
+ ${hessian_lite_version}
+
+
+ com.alibaba
+ fastjson
+ ${fastjson_version}
+
+
+ com.thoughtworks.xstream
+ xstream
+ ${xstream_version}
+
+
+ org.apache.bsf
+ bsf-api
+ ${bsf_version}
+
+
+ org.jvnet.sorcerer
+ sorcerer-javac
+ ${sorcerer_version}
+
+
+ org.apache.zookeeper
+ zookeeper
+ ${zookeeper_version}
+
+
+ com.101tec
+ zkclient
+ ${zkclient_version}
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.curator
+ curator-framework
+ ${curator_version}
+
+
+ redis.clients
+ jedis
+ ${jedis_version}
+
+
+ com.googlecode.xmemcached
+ xmemcached
+ ${xmemcached_version}
+
+
+ org.apache.cxf
+ cxf-rt-frontend-simple
+ ${cxf_version}
+
+
+ org.apache.cxf
+ cxf-rt-transports-http
+ ${cxf_version}
+
+
+ org.apache.thrift
+ libthrift
+ ${thrift_version}
+
+
+ org.apache.avro
+ avro
+ ${avro_version}
+
+
+ org.apache.avro
+ avro-ipc
+ ${avro_version}
+
+
+ jfree
+ jfreechart
+ ${jfreechart_version}
+
+
+ com.caucho
+ hessian
+ ${hessian_version}
+
+
+ javax.servlet
+ javax.servlet-api
+ ${servlet_version}
+
+
+ org.mortbay.jetty
+ jetty
+ ${jetty_version}
+
+
+ javax.validation
+ validation-api
+ ${validation_version}
+
+
+ org.hibernate
+ hibernate-validator
+ ${hibernate_validator_version}
+
+
+ javax.el
+ javax.el-api
+ ${javax.el-api_version}
+
+
+ org.glassfish.web
+ javax.el
+ ${javax.el_version}
+
+
+ javax.cache
+ cache-api
+ ${jcache_version}
+
+
+ org.apache.velocity
+ velocity
+ ${velocity_version}
+
+
+ org.apache.tuscany.sca
+ tuscany-sca-api
+ ${sca_version}
+
+
+ com.google.inject
+ guice
+ ${guice_version}
+
+
+ com.alibaba.citrus
+ citrus-webx-all
+ ${webx_version}
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+ ${jackson_version}
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson_version}
+
+
+
+ org.slf4j
+ slf4j-api
+ ${slf4j_version}
+
+
+ org.slf4j
+ slf4j-log4j12
+ ${slf4j_version}
+
+
+ commons-logging
+ commons-logging-api
+ ${jcl_version}
+
+
+ log4j
+ log4j
+ ${log4j_version}
+
+
+ ch.qos.logback
+ logback-classic
+ ${logback_version}
+
+
+ org.apache.logging.log4j
+ log4j-core
+ ${log4j2_version}
+
+
+ org.apache.logging.log4j
+ log4j-slf4j-impl
+ ${log4j2_version}
+
+
+
+ junit
+ junit
+ ${junit_version}
+ test
+
+
+ org.easymock
+ easymock
+ ${easymock_version}
+ test
+
+
+ com.googlecode.jmockit
+ jmockit
+ ${jmockit_version}
+ test
+
+
+ org.easymock
+ easymockclassextension
+ ${easymock_version}
+ test
+
+
+ cglib
+ cglib-nodep
+ ${cglib_version}
+
+
+ commons-lang
+ commons-lang
+ ${commons-lang_version}
+
+
+ commons-pool
+ commons-pool
+ ${commons_pool_version}
+
org.apache.tomcat.embed
tomcat-embed-core
@@ -524,287 +525,297 @@
fst
${fst_version}
-
-
-
-
- junit
- junit
-
-
- org.easymock
- easymock
-
-
- org.easymock
- easymockclassextension
-
-
- com.googlecode.jmockit
- jmockit
-
-
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
-
-
- true
- true
-
- true
- true
-
-
-
-
-
- maven-source-plugin
-
-
- attach-sources
- package
-
- jar-no-fork
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
-
- ${skip_maven_deploy}
-
-
-
+
+
+
+
+ junit
+ junit
+
+
+ org.easymock
+ easymock
+
+
+ org.easymock
+ easymockclassextension
+
+
+ com.googlecode.jmockit
+ jmockit
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+
+ maven-source-plugin
+
+
+ attach-sources
+ package
+
+ jar-no-fork
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+ ${skip_maven_deploy}
+
+
+
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- ${maven_jar_plugin_version}
-
-
- org.apache.maven.plugins
- maven-war-plugin
- ${maven_war_plugin_version}
-
-
- org.apache.maven.plugins
- maven-install-plugin
- ${maven_install_plugin_version}
-
-
- org.apache.maven.plugins
- maven-deploy-plugin
- ${maven_deploy_plugin_version}
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
- ${maven_compiler_plugin_version}
-
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+ ${maven_jar_plugin_version}
+
+
+ org.apache.maven.plugins
+ maven-war-plugin
+ ${maven_war_plugin_version}
+
+
+ org.apache.maven.plugins
+ maven-install-plugin
+ ${maven_install_plugin_version}
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+ ${maven_deploy_plugin_version}
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ ${maven_compiler_plugin_version}
+
true
-
- ${java_target_version}
- ${file_encoding}
+
+ ${java_target_version}
+ ${file_encoding}
-
+
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
-
- org.apache.maven.plugins
-
-
- maven-dependency-plugin
-
-
- [2.1,)
-
-
- unpack
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ org.eclipse.m2e
+ lifecycle-mapping
+ 1.0.0
+
+
+
+
+
+
+ org.apache.maven.plugins
+
+
+ maven-dependency-plugin
+
+
+ [2.1,)
+
+
+ unpack
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ jira
+ http://code.alibabatech.com/jira/browse/DUBBO
+
+
+ http://code.alibabatech.com/svn/dubbo/trunk
+ scm:svn:http://code.alibabatech.com/svn/dubbo/trunk
+
+
+
+ Dubbo User Mailling List
+ dubbo-subscribe AT googlegroups DOT com
+ dubbo-unsubscribe AT googlegroups DOT com
+ dubbo AT googlegroups DOT com
+ http://groups.google.com/group/dubbo
+
+
+
+
+ QianXiao(Shawn)
+ shawn.qianx
+ shawn.qianx (AT) alibaba-inc.com
+
+ Developer
+
+ +8
+
+
+ LiangFei(William)
+ william.liangf
+ william.liangf (AT) alibaba-inc.com
+
+ Developer
+
+ +8
+
+
+ LiDing(Jerry)
+ ding.lid
+ ding.lid (AT) alibaba-inc.com
+
+ Developer
+
+ +8
+
+
+ LiuChao(Charles)
+ chao.liuc
+ chao.liuc (AT) alibaba-inc.com
+
+ Developer
+
+ +8
+
+
+ LiuHaoMin(Ludvik)
+ haoming.liuhm
+ haoming.liuhm (AT) alibaba-inc.com
+
+ Developer
+
+ +8
+
+
+ ChenLei(Tony)
+ tony.chenl
+ tony.chenl (AT) alibaba-inc.com
+
+ Developer
+
+ +8
+
+
+ LvGang(Kimi)
+ gang.lvg
+ gang.lvg (AT) alibaba-inc.com
+
+ Developer
+
+ +8
+
+
-
+
+
+
+
+ xxx
+ http://x.x.x.x:9001/nexus/content/repositories/jichu/
+
+
-
- jira
- http://code.alibabatech.com/jira/browse/DUBBO
-
-
- http://code.alibabatech.com/svn/dubbo/trunk
- scm:svn:http://code.alibabatech.com/svn/dubbo/trunk
-
-
-
- Dubbo User Mailling List
- dubbo-subscribe AT googlegroups DOT com
- dubbo-unsubscribe AT googlegroups DOT com
- dubbo AT googlegroups DOT com
- http://groups.google.com/group/dubbo
-
-
-
-
- QianXiao(Shawn)
- shawn.qianx
- shawn.qianx (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiangFei(William)
- william.liangf
- william.liangf (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiDing(Jerry)
- ding.lid
- ding.lid (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiuChao(Charles)
- chao.liuc
- chao.liuc (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiuHaoMin(Ludvik)
- haoming.liuhm
- haoming.liuhm (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- ChenLei(Tony)
- tony.chenl
- tony.chenl (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LvGang(Kimi)
- gang.lvg
- gang.lvg (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
From 8535e8d3c4517307bd24b494f1bd178dd88baad7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Sun, 18 Sep 2016 10:58:40 +0800
Subject: [PATCH 18/32] update zkclient to 0.9
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index b6195827a7a..00a3176a67b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,7 +101,7 @@
0.8
3.4.6
- 0.8
+ 0.9
2.5.0
2.1.0
1.3.6
From 9cafeda06b61ab5b7d00998e7bcae2080216fa6a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Thu, 6 Oct 2016 20:35:15 +0800
Subject: [PATCH 19/32] grpc
---
dubbo-rpc/dubbo-rpc-grpc/pom.xml | 57 +++
.../dubbo/rpc/protocol/grpc/GRPCProtocol.java | 71 ++++
.../internal/com.alibaba.dubbo.rpc.Protocol | 1 +
dubbo-rpc/pom.xml | 1 +
dubbo/dependency-reduced-pom.xml | 380 ------------------
dubbo/pom.xml | 2 +
pom.xml | 9 +-
7 files changed, 140 insertions(+), 381 deletions(-)
create mode 100644 dubbo-rpc/dubbo-rpc-grpc/pom.xml
create mode 100644 dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GRPCProtocol.java
create mode 100644 dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
delete mode 100644 dubbo/dependency-reduced-pom.xml
diff --git a/dubbo-rpc/dubbo-rpc-grpc/pom.xml b/dubbo-rpc/dubbo-rpc-grpc/pom.xml
new file mode 100644
index 00000000000..17720bb2d9f
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-grpc/pom.xml
@@ -0,0 +1,57 @@
+
+
+ 4.0.0
+
+ com.alibaba
+ dubbo-rpc
+ 2.8.4a
+
+ dubbo-rpc-grpc
+ jar
+ ${project.artifactId}
+ The avro-rpc module of dubbo project
+
+ true
+
+
+
+
+ com.alibaba
+ dubbo-rpc-api
+ ${project.parent.version}
+
+
+
+
+ io.grpc
+ grpc-netty
+ 1.0.1
+
+
+ io.grpc
+ grpc-protobuf
+ 1.0.1
+
+
+ io.grpc
+ grpc-stub
+ 1.0.1
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GRPCProtocol.java b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GRPCProtocol.java
new file mode 100644
index 00000000000..d4eeb12608b
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GRPCProtocol.java
@@ -0,0 +1,71 @@
+package com.alibaba.dubbo.rpc.protocol.grpc;
+
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import io.grpc.*;
+
+import java.io.IOException;
+
+/**
+ * 为dubbo-rpc添加"google-gRPC"支持
+ * by 杨俊明(http://yjmyzz.cnblogs.com/)
+ */
+public class GRPCProtocol extends AbstractProxyProtocol {
+ public static final int DEFAULT_PORT = 50051;
+ private static final Logger logger = LoggerFactory.getLogger(GRPCProtocol.class);
+
+ public int getDefaultPort() {
+ return DEFAULT_PORT;
+ }
+
+ public GRPCProtocol() {
+ super(IOException.class, RpcException.class);
+ }
+
+ @Override
+ protected Runnable doExport(T impl, Class type, URL url)
+ throws RpcException {
+
+ logger.info("impl => " + impl.getClass());
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+
+ try {
+ BindableService service = (BindableService) type.newInstance();
+ final Server grpcServer = ServerBuilder.forPort(url.getPort())
+ .addService(service)
+ .build()
+ .start();
+
+ return new Runnable() {
+ public void run() {
+ try {
+ logger.info("Close gRPC Server");
+ grpcServer.shutdown();
+ } catch (Throwable e) {
+ logger.warn(e.getMessage(), e);
+ }
+ }
+ };
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException(e.getMessage(), e);
+ }
+ }
+
+ @Override
+ protected T doRefer(Class type, URL url) throws RpcException {
+
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+ final ManagedChannel channel = ManagedChannelBuilder.forAddress(url.getHost(), url.getPort())
+ .usePlaintext(true)
+ .build();
+
+ return (T) channel;
+ }
+
+}
diff --git a/dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
new file mode 100644
index 00000000000..dc7c74ed76b
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
@@ -0,0 +1 @@
+gRPC=com.alibaba.dubbo.rpc.protocol.grpc.GRPCProtocol
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index 1cef7e68615..0bfaecab8ee 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -39,6 +39,7 @@
dubbo-rpc-webservice
dubbo-rpc-thrift
dubbo-rpc-thrift2
+ dubbo-rpc-grpc
dubbo-rpc-memcached
dubbo-rpc-redis
dubbo-rpc-rest
diff --git a/dubbo/dependency-reduced-pom.xml b/dubbo/dependency-reduced-pom.xml
deleted file mode 100644
index 11f3c20dd91..00000000000
--- a/dubbo/dependency-reduced-pom.xml
+++ /dev/null
@@ -1,380 +0,0 @@
-
-
-
- dubbo-parent
- com.alibaba
- 2.8.4a
-
- 4.0.0
- dubbo
- ${project.artifactId}
- The all in one project of dubbo
-
-
-
- maven-source-plugin
-
-
- attach-sources
- package
-
- jar-no-fork
-
-
-
-
-
- maven-javadoc-plugin
- 2.10.3
-
-
- attach-javadoc
- deploy
-
- jar
-
-
-
-
- public
- UTF-8
- UTF-8
- UTF-8
- com.alibaba.com.*
-
- http://docs.oracle.com/javase/6/docs/api
-
-
-
-
- maven-shade-plugin
- 1.4
-
-
- package
-
- shade
-
-
- true
- true
-
-
- com.alibaba:hessian-lite
- com.alibaba:dubbo-common
- com.alibaba:dubbo-remoting-api
- com.alibaba:dubbo-remoting-netty
- com.alibaba:dubbo-remoting-mina
- com.alibaba:dubbo-remoting-grizzly
- com.alibaba:dubbo-remoting-p2p
- com.alibaba:dubbo-remoting-http
- com.alibaba:dubbo-remoting-zookeeper
- com.alibaba:dubbo-rpc-api
- com.alibaba:dubbo-rpc-avro
- com.alibaba:dubbo-rpc-default
- com.alibaba:dubbo-rpc-injvm
- com.alibaba:dubbo-rpc-rmi
- com.alibaba:dubbo-rpc-hessian
- com.alibaba:dubbo-rpc-http
- com.alibaba:dubbo-rpc-webservice
- com.alibaba:dubbo-rpc-thrift
- com.alibaba:dubbo-rpc-thrift2
- com.alibaba:dubbo-rpc-memcached
- com.alibaba:dubbo-rpc-redis
- com.alibaba:dubbo-rpc-rest
- com.alibaba:dubbo-filter-validation
- com.alibaba:dubbo-filter-cache
- com.alibaba:dubbo-cluster
- com.alibaba:dubbo-registry-api
- com.alibaba:dubbo-registry-default
- com.alibaba:dubbo-registry-multicast
- com.alibaba:dubbo-registry-zookeeper
- com.alibaba:dubbo-registry-redis
- com.alibaba:dubbo-monitor-api
- com.alibaba:dubbo-monitor-default
- com.alibaba:dubbo-config-api
- com.alibaba:dubbo-config-spring
- com.alibaba:dubbo-container-api
- com.alibaba:dubbo-container-spring
- com.alibaba:dubbo-container-javaconfig
- com.alibaba:dubbo-container-jetty
- com.alibaba:dubbo-container-log4j
- com.alibaba:dubbo-container-logback
-
-
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.common.extension.ExtensionFactory
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.common.threadpool.ThreadPool
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Dispatcher
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Codec2
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Transporter
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.exchange.Exchanger
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.p2p.Networker
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.telnet.TelnetHandler
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Filter
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.InvokerListener
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ExporterListener
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ProxyFactory
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Cluster
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.LoadBalance
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Merger
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.RouterFactory
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.ConfiguratorFactory
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.container.Container
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.container.page.PageHandler
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.monitor.MonitorFactory
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.validation.Validation
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.cache.CacheFactory
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.common.store.DataStore
-
-
- META-INF/dubbo/internal/com.alibaba.dubbo.common.logger.LoggerAdapter
-
-
-
-
-
-
-
-
-
-
- org.springframework
- spring-beans
- 4.2.4.RELEASE
- compile
-
-
- org.springframework
- spring-core
- 4.2.4.RELEASE
- compile
-
-
- org.springframework
- spring-context
- 4.2.4.RELEASE
- compile
-
-
- org.springframework
- spring-aop
- 4.2.4.RELEASE
- compile
-
-
- aopalliance
- aopalliance
- 1.0
- compile
-
-
- org.springframework
- spring-expression
- 4.2.4.RELEASE
- compile
-
-
- io.netty
- netty
- 3.9.9.Final
- compile
-
-
- log4j
- log4j
- 1.2.17
- compile
-
-
- org.apache.logging.log4j
- log4j-core
- 2.5
- compile
-
-
- org.apache.logging.log4j
- log4j-api
- 2.5
- compile
-
-
- org.javassist
- javassist
- 3.15.0-GA
- compile
-
-
- javax.servlet
- javax.servlet-api
- 3.1.0
- compile
-
-
- org.springframework
- spring-web
- 4.2.4.RELEASE
- compile
-
-
- org.slf4j
- slf4j-api
- 1.7.15
- compile
-
-
- org.apache.httpcomponents
- httpclient
- 4.3.4
- compile
-
-
- org.apache.httpcomponents
- httpcore
- 4.3.2
- compile
-
-
- commons-logging
- commons-logging
- 1.1.3
- compile
-
-
- commons-codec
- commons-codec
- 1.6
- compile
-
-
- commons-lang
- commons-lang
- 2.6
- compile
-
-
- commons-pool
- commons-pool
- 1.6
- compile
-
-
- com.101tec
- zkclient
- 0.8
- compile
-
-
- zookeeper
- org.apache.zookeeper
-
-
-
-
- org.slf4j
- slf4j-log4j12
- 1.7.15
- compile
-
-
- org.apache.curator
- curator-framework
- 2.5.0
- compile
-
-
- zookeeper
- org.apache.zookeeper
-
-
-
-
- org.apache.curator
- curator-client
- 2.5.0
- compile
-
-
- zookeeper
- org.apache.zookeeper
-
-
-
-
- com.google.guava
- guava
- 16.0.1
- compile
-
-
-
- false
-
-
-
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index 6331409f3df..ad89e07b3eb 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -30,6 +30,8 @@
false
+
+
com.alibaba
diff --git a/pom.xml b/pom.xml
index 00a3176a67b..9709ac39629 100644
--- a/pom.xml
+++ b/pom.xml
@@ -101,7 +101,7 @@
0.8
3.4.6
- 0.9
+ 0.8.1
2.5.0
2.1.0
1.3.6
@@ -807,4 +807,11 @@
+8
+
+
+
+
+
+
+
From 878b8af686e092b0f69e47ca1fdab47eec330b66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Sat, 8 Oct 2016 19:47:30 +0800
Subject: [PATCH 20/32] =?UTF-8?q?=E5=A2=9E=E5=8A=A0grpc=E7=9A=84=E6=94=AF?=
=?UTF-8?q?=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 3 +
dubbo-cluster/pom.xml | 2 +-
dubbo-common/pom.xml | 2 +-
dubbo-config/dubbo-config-api/pom.xml | 14 +-
dubbo-config/dubbo-config-spring/pom.xml | 14 +-
dubbo-config/pom.xml | 2 +-
dubbo-container/dubbo-container-api/pom.xml | 2 +-
.../dubbo-container-javaconfig/pom.xml | 2 +-
dubbo-container/dubbo-container-jetty/pom.xml | 2 +-
dubbo-container/dubbo-container-log4j/pom.xml | 2 +-
.../dubbo-container-logback/pom.xml | 2 +-
.../dubbo-container-spring/pom.xml | 2 +-
dubbo-container/pom.xml | 4 +-
dubbo-demo/dubbo-demo-api/pom.xml | 2 +-
dubbo-demo/dubbo-demo-consumer/pom.xml | 2 +-
dubbo-demo/dubbo-demo-provider/pom.xml | 2 +-
dubbo-demo/pom.xml | 2 +-
dubbo-filter/dubbo-filter-cache/pom.xml | 2 +-
dubbo-filter/dubbo-filter-validation/pom.xml | 2 +-
dubbo-filter/pom.xml | 2 +-
dubbo-monitor/dubbo-monitor-api/pom.xml | 2 +-
dubbo-monitor/dubbo-monitor-default/pom.xml | 2 +-
dubbo-monitor/pom.xml | 2 +-
dubbo-registry/dubbo-registry-api/pom.xml | 2 +-
dubbo-registry/dubbo-registry-default/pom.xml | 14 +-
.../dubbo-registry-multicast/pom.xml | 2 +-
dubbo-registry/dubbo-registry-redis/pom.xml | 2 +-
.../dubbo-registry-zookeeper/pom.xml | 2 +-
dubbo-registry/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-api/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-grizzly/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-http/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-mina/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-netty/pom.xml | 2 +-
dubbo-remoting/dubbo-remoting-p2p/pom.xml | 2 +-
.../dubbo-remoting-zookeeper/pom.xml | 2 +-
dubbo-remoting/pom.xml | 8 +-
dubbo-rpc/dubbo-rpc-api/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-avro/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-default/pom.xml | 24 +-
dubbo-rpc/dubbo-rpc-grpc/pom.xml | 5 +-
.../protocol/grpc/DefaultBindableService.java | 27 ++
.../protocol/grpc/GrpcBindableService.java | 14 +
.../{GRPCProtocol.java => GrpcProtocol.java} | 28 +-
.../internal/com.alibaba.dubbo.rpc.Protocol | 2 +-
dubbo-rpc/dubbo-rpc-hessian/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-http/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-injvm/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-memcached/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-redis/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-rest/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-rmi/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-thrift/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-thrift2/pom.xml | 2 +-
dubbo-rpc/dubbo-rpc-webservice/pom.xml | 2 +-
dubbo-rpc/pom.xml | 14 +-
dubbo-simple/dubbo-monitor-simple/pom.xml | 2 +-
dubbo-simple/dubbo-registry-simple/pom.xml | 2 +-
dubbo-simple/pom.xml | 2 +-
dubbo-test/dubbo-test-benchmark-api/pom.xml | 2 +-
.../dubbo-test-benchmark-client/pom.xml | 2 +-
.../dubbo-test-benchmark-server/pom.xml | 2 +-
dubbo-test/dubbo-test-benchmark/pom.xml | 2 +-
dubbo-test/dubbo-test-compatibility/pom.xml | 2 +-
dubbo-test/dubbo-test-examples/pom.xml | 2 +-
dubbo-test/dubbo-test-integration/pom.xml | 2 +-
dubbo-test/pom.xml | 2 +-
dubbo-tool/dubbo-demo-lite-archetype/pom.xml | 2 +-
.../resources/archetype-resources/pom.xml | 4 +-
.../dubbo-demo-lite-api/pom.xml | 2 +-
.../dubbo-demo-lite-consumer/pom.xml | 2 +-
.../dubbo-demo-lite-provider/pom.xml | 2 +-
dubbo-tool/dubbo-demo-lite/pom.xml | 4 +-
dubbo/pom.xml | 250 ++++++++++--------
hessian-lite/pom.xml | 2 +-
pom.xml | 15 +-
76 files changed, 319 insertions(+), 243 deletions(-)
create mode 100644 dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/DefaultBindableService.java
create mode 100644 dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GrpcBindableService.java
rename dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/{GRPCProtocol.java => GrpcProtocol.java} (71%)
diff --git a/README.md b/README.md
index 6a9e9c06d3b..6792d86ab58 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,9 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* 增加log4j2支持,原来一些硬编码依赖log4j的代码,改为依赖slf4j,以便兼容其它一些主流日志组件(杨俊明)
* 增加原生thrift支持,升级thrift到0.9.3,为避免与dubbo原来的thrift实现命名冲突,新增的原生thrift协议,协议名称改为thrift2(杨俊明)
* 增加hadoop avro支持(杨俊明)
+* **2.8.5-SNAPSHOT**:
+ * 编译时去掉了一些不常用的模块,以加快项目整体的编译速度(杨俊明)
+ * 增加了google-gRPC-1.0.1的支持,目前仅处于“玩票”阶段,生产环境请慎用(杨俊明)
## 依赖
diff --git a/dubbo-cluster/pom.xml b/dubbo-cluster/pom.xml
index b1f5250e659..20e2db2570b 100644
--- a/dubbo-cluster/pom.xml
+++ b/dubbo-cluster/pom.xml
@@ -20,7 +20,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-cluster
jar
diff --git a/dubbo-common/pom.xml b/dubbo-common/pom.xml
index cbe1c26e6a6..d156d50b4d8 100644
--- a/dubbo-common/pom.xml
+++ b/dubbo-common/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-common
jar
diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml
index 9c9feb597a6..9ee78f72559 100644
--- a/dubbo-config/dubbo-config-api/pom.xml
+++ b/dubbo-config/dubbo-config-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-config
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-config-api
jar
@@ -72,12 +72,12 @@
${project.parent.version}
test
-
- com.alibaba
- dubbo-rpc-rmi
- ${project.parent.version}
- test
-
+
+
+
+
+
+
com.alibaba
dubbo-rpc-injvm
diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml
index cae37500984..44c5d6f05ee 100644
--- a/dubbo-config/dubbo-config-spring/pom.xml
+++ b/dubbo-config/dubbo-config-spring/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-config
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-config-spring
jar
@@ -60,12 +60,12 @@
${project.parent.version}
test
-
- com.alibaba
- dubbo-rpc-rmi
- ${project.parent.version}
- test
-
+
+
+
+
+
+
com.alibaba
dubbo-rpc-injvm
diff --git a/dubbo-config/pom.xml b/dubbo-config/pom.xml
index 1bb9edbe562..3cc99c10435 100644
--- a/dubbo-config/pom.xml
+++ b/dubbo-config/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-config
pom
diff --git a/dubbo-container/dubbo-container-api/pom.xml b/dubbo-container/dubbo-container-api/pom.xml
index bcb5e3b1483..7ae694e8ad7 100644
--- a/dubbo-container/dubbo-container-api/pom.xml
+++ b/dubbo-container/dubbo-container-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-container-api
jar
diff --git a/dubbo-container/dubbo-container-javaconfig/pom.xml b/dubbo-container/dubbo-container-javaconfig/pom.xml
index a9e5a6e32ca..9ae9c5c804e 100644
--- a/dubbo-container/dubbo-container-javaconfig/pom.xml
+++ b/dubbo-container/dubbo-container-javaconfig/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-container-javaconfig
jar
diff --git a/dubbo-container/dubbo-container-jetty/pom.xml b/dubbo-container/dubbo-container-jetty/pom.xml
index fbc042b86da..570d00d2644 100644
--- a/dubbo-container/dubbo-container-jetty/pom.xml
+++ b/dubbo-container/dubbo-container-jetty/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-container-jetty
jar
diff --git a/dubbo-container/dubbo-container-log4j/pom.xml b/dubbo-container/dubbo-container-log4j/pom.xml
index 04ca6352033..942f25c9ff9 100644
--- a/dubbo-container/dubbo-container-log4j/pom.xml
+++ b/dubbo-container/dubbo-container-log4j/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-container-log4j
jar
diff --git a/dubbo-container/dubbo-container-logback/pom.xml b/dubbo-container/dubbo-container-logback/pom.xml
index a64811a669a..f5e7ca2bbcb 100644
--- a/dubbo-container/dubbo-container-logback/pom.xml
+++ b/dubbo-container/dubbo-container-logback/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-container-logback
jar
diff --git a/dubbo-container/dubbo-container-spring/pom.xml b/dubbo-container/dubbo-container-spring/pom.xml
index eea0dcc9235..6ede6fc1a7b 100644
--- a/dubbo-container/dubbo-container-spring/pom.xml
+++ b/dubbo-container/dubbo-container-spring/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-container
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-container-spring
jar
diff --git a/dubbo-container/pom.xml b/dubbo-container/pom.xml
index 9ee40407c06..59b62f003a3 100644
--- a/dubbo-container/pom.xml
+++ b/dubbo-container/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-container
pom
@@ -33,7 +33,7 @@
dubbo-container-spring
dubbo-container-javaconfig
dubbo-container-jetty
- dubbo-container-log4j
+
dubbo-container-logback
diff --git a/dubbo-demo/dubbo-demo-api/pom.xml b/dubbo-demo/dubbo-demo-api/pom.xml
index f95d6ae7a2c..26bbe1f8e97 100644
--- a/dubbo-demo/dubbo-demo-api/pom.xml
+++ b/dubbo-demo/dubbo-demo-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo-api
jar
diff --git a/dubbo-demo/dubbo-demo-consumer/pom.xml b/dubbo-demo/dubbo-demo-consumer/pom.xml
index 323497c7537..fe176f70bb4 100644
--- a/dubbo-demo/dubbo-demo-consumer/pom.xml
+++ b/dubbo-demo/dubbo-demo-consumer/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo-consumer
jar
diff --git a/dubbo-demo/dubbo-demo-provider/pom.xml b/dubbo-demo/dubbo-demo-provider/pom.xml
index 2b8101b0664..8859cbc9ca8 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo-provider
war
diff --git a/dubbo-demo/pom.xml b/dubbo-demo/pom.xml
index fcdd71e8998..ffc7e084be8 100644
--- a/dubbo-demo/pom.xml
+++ b/dubbo-demo/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo
pom
diff --git a/dubbo-filter/dubbo-filter-cache/pom.xml b/dubbo-filter/dubbo-filter-cache/pom.xml
index 7f951e555fa..9932dea7d68 100644
--- a/dubbo-filter/dubbo-filter-cache/pom.xml
+++ b/dubbo-filter/dubbo-filter-cache/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-filter
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-filter-cache
jar
diff --git a/dubbo-filter/dubbo-filter-validation/pom.xml b/dubbo-filter/dubbo-filter-validation/pom.xml
index c918e55e158..402d6306f5c 100644
--- a/dubbo-filter/dubbo-filter-validation/pom.xml
+++ b/dubbo-filter/dubbo-filter-validation/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-filter
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-filter-validation
jar
diff --git a/dubbo-filter/pom.xml b/dubbo-filter/pom.xml
index 88e1835f765..7debf871ee3 100644
--- a/dubbo-filter/pom.xml
+++ b/dubbo-filter/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-filter
pom
diff --git a/dubbo-monitor/dubbo-monitor-api/pom.xml b/dubbo-monitor/dubbo-monitor-api/pom.xml
index f8ec16ebc59..5d6dcadb9e5 100644
--- a/dubbo-monitor/dubbo-monitor-api/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-monitor
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-monitor-api
jar
diff --git a/dubbo-monitor/dubbo-monitor-default/pom.xml b/dubbo-monitor/dubbo-monitor-default/pom.xml
index 313aaf0930d..2668f833804 100644
--- a/dubbo-monitor/dubbo-monitor-default/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-default/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-monitor
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-monitor-default
jar
diff --git a/dubbo-monitor/pom.xml b/dubbo-monitor/pom.xml
index df25f820de1..217c71764a3 100644
--- a/dubbo-monitor/pom.xml
+++ b/dubbo-monitor/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-monitor
pom
diff --git a/dubbo-registry/dubbo-registry-api/pom.xml b/dubbo-registry/dubbo-registry-api/pom.xml
index fe9110c6435..9342cdcb250 100644
--- a/dubbo-registry/dubbo-registry-api/pom.xml
+++ b/dubbo-registry/dubbo-registry-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-registry-api
jar
diff --git a/dubbo-registry/dubbo-registry-default/pom.xml b/dubbo-registry/dubbo-registry-default/pom.xml
index f0f2588e490..c8db6ea851d 100644
--- a/dubbo-registry/dubbo-registry-default/pom.xml
+++ b/dubbo-registry/dubbo-registry-default/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-registry-default
jar
@@ -40,12 +40,12 @@
${project.parent.version}
test
-
- com.alibaba
- dubbo-rpc-injvm
- ${project.parent.version}
- test
-
+
+
+
+
+
+
com.alibaba
dubbo-remoting-netty
diff --git a/dubbo-registry/dubbo-registry-multicast/pom.xml b/dubbo-registry/dubbo-registry-multicast/pom.xml
index 88415cff157..e51af12fdf1 100644
--- a/dubbo-registry/dubbo-registry-multicast/pom.xml
+++ b/dubbo-registry/dubbo-registry-multicast/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-registry-multicast
jar
diff --git a/dubbo-registry/dubbo-registry-redis/pom.xml b/dubbo-registry/dubbo-registry-redis/pom.xml
index 7957606f143..fe3ddf6cd33 100644
--- a/dubbo-registry/dubbo-registry-redis/pom.xml
+++ b/dubbo-registry/dubbo-registry-redis/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-registry-redis
jar
diff --git a/dubbo-registry/dubbo-registry-zookeeper/pom.xml b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
index b76bdb6bd56..3ddc7e5b9f0 100644
--- a/dubbo-registry/dubbo-registry-zookeeper/pom.xml
+++ b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-registry
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-registry-zookeeper
jar
diff --git a/dubbo-registry/pom.xml b/dubbo-registry/pom.xml
index efcc5f7a787..2c87426e5c2 100644
--- a/dubbo-registry/pom.xml
+++ b/dubbo-registry/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-registry
pom
diff --git a/dubbo-remoting/dubbo-remoting-api/pom.xml b/dubbo-remoting/dubbo-remoting-api/pom.xml
index e101e401e6e..12b78d799cb 100644
--- a/dubbo-remoting/dubbo-remoting-api/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting-api
jar
diff --git a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
index 448caf8ace2..60e1d4b501a 100644
--- a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting-grizzly
jar
diff --git a/dubbo-remoting/dubbo-remoting-http/pom.xml b/dubbo-remoting/dubbo-remoting-http/pom.xml
index ad13e4de826..69cdabc07a9 100644
--- a/dubbo-remoting/dubbo-remoting-http/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-http/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting-http
jar
diff --git a/dubbo-remoting/dubbo-remoting-mina/pom.xml b/dubbo-remoting/dubbo-remoting-mina/pom.xml
index aaabd46cd02..df1bbad852e 100644
--- a/dubbo-remoting/dubbo-remoting-mina/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-mina/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting-mina
jar
diff --git a/dubbo-remoting/dubbo-remoting-netty/pom.xml b/dubbo-remoting/dubbo-remoting-netty/pom.xml
index bb4405b6250..34328a4568d 100644
--- a/dubbo-remoting/dubbo-remoting-netty/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-netty/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting-netty
jar
diff --git a/dubbo-remoting/dubbo-remoting-p2p/pom.xml b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
index ea68fee293e..3ee39816e5f 100644
--- a/dubbo-remoting/dubbo-remoting-p2p/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting-p2p
jar
diff --git a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
index 896a825dd72..2fdc66f54c6 100644
--- a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-remoting
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting-zookeeper
jar
diff --git a/dubbo-remoting/pom.xml b/dubbo-remoting/pom.xml
index d4f4cd4d4ee..6e2dd740d56 100644
--- a/dubbo-remoting/pom.xml
+++ b/dubbo-remoting/pom.xml
@@ -18,7 +18,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-remoting
pom
@@ -30,9 +30,9 @@
dubbo-remoting-api
dubbo-remoting-netty
- dubbo-remoting-mina
- dubbo-remoting-grizzly
- dubbo-remoting-p2p
+
+
+
dubbo-remoting-http
dubbo-remoting-zookeeper
diff --git a/dubbo-rpc/dubbo-rpc-api/pom.xml b/dubbo-rpc/dubbo-rpc-api/pom.xml
index a08df335504..1aacb4f94d3 100644
--- a/dubbo-rpc/dubbo-rpc-api/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-api
jar
diff --git a/dubbo-rpc/dubbo-rpc-avro/pom.xml b/dubbo-rpc/dubbo-rpc-avro/pom.xml
index 7066a3dffa9..0b1eb507cf3 100644
--- a/dubbo-rpc/dubbo-rpc-avro/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-avro/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-avro
jar
diff --git a/dubbo-rpc/dubbo-rpc-default/pom.xml b/dubbo-rpc/dubbo-rpc-default/pom.xml
index eab1863edeb..f8d8aa2739f 100644
--- a/dubbo-rpc/dubbo-rpc-default/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-default/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-default
jar
@@ -56,16 +56,16 @@
${project.parent.version}
test
-
- com.alibaba
- dubbo-remoting-mina
- ${project.parent.version}
- test
-
-
- org.apache.mina
- mina-core
- test
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-grpc/pom.xml b/dubbo-rpc/dubbo-rpc-grpc/pom.xml
index 17720bb2d9f..b88c2167274 100644
--- a/dubbo-rpc/dubbo-rpc-grpc/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-grpc/pom.xml
@@ -19,12 +19,12 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-grpc
jar
${project.artifactId}
- The avro-rpc module of dubbo project
+ The grpc module of dubbo project
true
@@ -54,4 +54,5 @@
+
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/DefaultBindableService.java b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/DefaultBindableService.java
new file mode 100644
index 00000000000..a722e87c8f2
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/DefaultBindableService.java
@@ -0,0 +1,27 @@
+package com.alibaba.dubbo.rpc.protocol.grpc;
+
+import io.grpc.Channel;
+import io.grpc.ServerServiceDefinition;
+
+/**
+ * Created by yangjunming on 16/10/7.
+ */
+public class DefaultBindableService implements GrpcBindableService {
+
+ private Channel channel;
+
+ @Override
+ public Channel getChannel() {
+ return channel;
+ }
+
+ @Override
+ public void setChannel(Channel channel) {
+ this.channel = channel;
+ }
+
+ @Override
+ public ServerServiceDefinition bindService() {
+ return null;
+ }
+}
diff --git a/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GrpcBindableService.java b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GrpcBindableService.java
new file mode 100644
index 00000000000..c1c57750c29
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GrpcBindableService.java
@@ -0,0 +1,14 @@
+package com.alibaba.dubbo.rpc.protocol.grpc;
+
+import io.grpc.BindableService;
+import io.grpc.Channel;
+
+/**
+ * Created by yangjunming on 16/10/7.
+ */
+public interface GrpcBindableService extends BindableService {
+
+ Channel getChannel();
+
+ void setChannel(Channel channel);
+}
diff --git a/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GRPCProtocol.java b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GrpcProtocol.java
similarity index 71%
rename from dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GRPCProtocol.java
rename to dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GrpcProtocol.java
index d4eeb12608b..85dc8a21dce 100644
--- a/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GRPCProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-grpc/src/main/java/com/alibaba/dubbo/rpc/protocol/grpc/GrpcProtocol.java
@@ -5,7 +5,10 @@
import com.alibaba.dubbo.common.logger.LoggerFactory;
import com.alibaba.dubbo.rpc.RpcException;
import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
-import io.grpc.*;
+import io.grpc.ManagedChannel;
+import io.grpc.ManagedChannelBuilder;
+import io.grpc.Server;
+import io.grpc.ServerBuilder;
import java.io.IOException;
@@ -13,15 +16,15 @@
* 为dubbo-rpc添加"google-gRPC"支持
* by 杨俊明(http://yjmyzz.cnblogs.com/)
*/
-public class GRPCProtocol extends AbstractProxyProtocol {
+public class GrpcProtocol extends AbstractProxyProtocol {
public static final int DEFAULT_PORT = 50051;
- private static final Logger logger = LoggerFactory.getLogger(GRPCProtocol.class);
+ private static final Logger logger = LoggerFactory.getLogger(GrpcProtocol.class);
public int getDefaultPort() {
return DEFAULT_PORT;
}
- public GRPCProtocol() {
+ public GrpcProtocol() {
super(IOException.class, RpcException.class);
}
@@ -34,12 +37,14 @@ protected Runnable doExport(T impl, Class type, URL url)
logger.info("url => " + url);
try {
- BindableService service = (BindableService) type.newInstance();
+ String clsName = url.getParameter("class");
+ Class> cls = Class.forName(clsName);
+ GrpcBindableService service = (GrpcBindableService) cls.newInstance();
final Server grpcServer = ServerBuilder.forPort(url.getPort())
.addService(service)
.build()
.start();
-
+ logger.info("grpc server started !");
return new Runnable() {
public void run() {
try {
@@ -58,14 +63,19 @@ public void run() {
@Override
protected T doRefer(Class type, URL url) throws RpcException {
-
logger.info("type => " + type.getName());
logger.info("url => " + url);
final ManagedChannel channel = ManagedChannelBuilder.forAddress(url.getHost(), url.getPort())
.usePlaintext(true)
.build();
-
- return (T) channel;
+ try {
+ DefaultBindableService service = new DefaultBindableService();
+ service.setChannel(channel);
+ return (T) service;
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException(e.getMessage(), e);
+ }
}
}
diff --git a/dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
index dc7c74ed76b..e09695d55ef 100644
--- a/dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
+++ b/dubbo-rpc/dubbo-rpc-grpc/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
@@ -1 +1 @@
-gRPC=com.alibaba.dubbo.rpc.protocol.grpc.GRPCProtocol
+grpc=com.alibaba.dubbo.rpc.protocol.grpc.GrpcProtocol
diff --git a/dubbo-rpc/dubbo-rpc-hessian/pom.xml b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
index 2fac2e54d7b..c1b8394ac84 100644
--- a/dubbo-rpc/dubbo-rpc-hessian/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-hessian
jar
diff --git a/dubbo-rpc/dubbo-rpc-http/pom.xml b/dubbo-rpc/dubbo-rpc-http/pom.xml
index 6d397fb7085..3687a9bd311 100644
--- a/dubbo-rpc/dubbo-rpc-http/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-http/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-http
jar
diff --git a/dubbo-rpc/dubbo-rpc-injvm/pom.xml b/dubbo-rpc/dubbo-rpc-injvm/pom.xml
index 828104482ef..d4f7a02a77a 100644
--- a/dubbo-rpc/dubbo-rpc-injvm/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-injvm/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-injvm
jar
diff --git a/dubbo-rpc/dubbo-rpc-memcached/pom.xml b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
index 3294c5ed31a..81878594349 100644
--- a/dubbo-rpc/dubbo-rpc-memcached/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-memcached
jar
diff --git a/dubbo-rpc/dubbo-rpc-redis/pom.xml b/dubbo-rpc/dubbo-rpc-redis/pom.xml
index 46e5f017cf7..4fb7ad1000b 100644
--- a/dubbo-rpc/dubbo-rpc-redis/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-redis/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-redis
jar
diff --git a/dubbo-rpc/dubbo-rpc-rest/pom.xml b/dubbo-rpc/dubbo-rpc-rest/pom.xml
index 91b5d2379fc..a470ea54957 100644
--- a/dubbo-rpc/dubbo-rpc-rest/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-rest/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-rest
jar
diff --git a/dubbo-rpc/dubbo-rpc-rmi/pom.xml b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
index 5d9f4ecb366..d430231e558 100644
--- a/dubbo-rpc/dubbo-rpc-rmi/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-rmi
jar
diff --git a/dubbo-rpc/dubbo-rpc-thrift/pom.xml b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
index ab808b4318f..63456af966e 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-thrift
jar
diff --git a/dubbo-rpc/dubbo-rpc-thrift2/pom.xml b/dubbo-rpc/dubbo-rpc-thrift2/pom.xml
index 9f5bb9e6b8f..09f601d4b51 100644
--- a/dubbo-rpc/dubbo-rpc-thrift2/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-thrift2/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-thrift2
jar
diff --git a/dubbo-rpc/dubbo-rpc-webservice/pom.xml b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
index c50d9d1bdca..c827373cd1a 100644
--- a/dubbo-rpc/dubbo-rpc-webservice/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-rpc
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc-webservice
jar
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index 0bfaecab8ee..6cbe8c319b4 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-rpc
pom
@@ -33,15 +33,15 @@
dubbo-rpc-avro
dubbo-rpc-default
dubbo-rpc-injvm
- dubbo-rpc-rmi
- dubbo-rpc-hessian
+
+
dubbo-rpc-http
- dubbo-rpc-webservice
- dubbo-rpc-thrift
+
+
dubbo-rpc-thrift2
dubbo-rpc-grpc
- dubbo-rpc-memcached
- dubbo-rpc-redis
+
+
dubbo-rpc-rest
diff --git a/dubbo-simple/dubbo-monitor-simple/pom.xml b/dubbo-simple/dubbo-monitor-simple/pom.xml
index 307638c528a..93aca73117e 100644
--- a/dubbo-simple/dubbo-monitor-simple/pom.xml
+++ b/dubbo-simple/dubbo-monitor-simple/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-simple
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-monitor-simple
jar
diff --git a/dubbo-simple/dubbo-registry-simple/pom.xml b/dubbo-simple/dubbo-registry-simple/pom.xml
index 880f7596628..63e9aeeafe0 100644
--- a/dubbo-simple/dubbo-registry-simple/pom.xml
+++ b/dubbo-simple/dubbo-registry-simple/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-simple
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-registry-simple
jar
diff --git a/dubbo-simple/pom.xml b/dubbo-simple/pom.xml
index ff4e1da5e8d..cff6069f41a 100644
--- a/dubbo-simple/pom.xml
+++ b/dubbo-simple/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-simple
pom
diff --git a/dubbo-test/dubbo-test-benchmark-api/pom.xml b/dubbo-test/dubbo-test-benchmark-api/pom.xml
index 1310c1db3c7..8c3dcec4a1a 100644
--- a/dubbo-test/dubbo-test-benchmark-api/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark-api/pom.xml
@@ -4,7 +4,7 @@
com.alibaba
dubbo-test
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test-benchmark-api
jar
diff --git a/dubbo-test/dubbo-test-benchmark-client/pom.xml b/dubbo-test/dubbo-test-benchmark-client/pom.xml
index 6150fec8ee5..2b1de5545f9 100644
--- a/dubbo-test/dubbo-test-benchmark-client/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark-client/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test-benchmark-client
jar
diff --git a/dubbo-test/dubbo-test-benchmark-server/pom.xml b/dubbo-test/dubbo-test-benchmark-server/pom.xml
index d6f8ad9a920..5f10d344ee5 100644
--- a/dubbo-test/dubbo-test-benchmark-server/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark-server/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test-benchmark-server
jar
diff --git a/dubbo-test/dubbo-test-benchmark/pom.xml b/dubbo-test/dubbo-test-benchmark/pom.xml
index beef341d9ec..20c0c48e11f 100644
--- a/dubbo-test/dubbo-test-benchmark/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test-benchmark
jar
diff --git a/dubbo-test/dubbo-test-compatibility/pom.xml b/dubbo-test/dubbo-test-compatibility/pom.xml
index 3db5b2ebb80..5f6d4bf27ee 100644
--- a/dubbo-test/dubbo-test-compatibility/pom.xml
+++ b/dubbo-test/dubbo-test-compatibility/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test-compatibility
jar
diff --git a/dubbo-test/dubbo-test-examples/pom.xml b/dubbo-test/dubbo-test-examples/pom.xml
index 796520c21f5..e1bafd964f4 100644
--- a/dubbo-test/dubbo-test-examples/pom.xml
+++ b/dubbo-test/dubbo-test-examples/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test-examples
jar
diff --git a/dubbo-test/dubbo-test-integration/pom.xml b/dubbo-test/dubbo-test-integration/pom.xml
index c78187636c5..a9eaaa974ca 100644
--- a/dubbo-test/dubbo-test-integration/pom.xml
+++ b/dubbo-test/dubbo-test-integration/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-test
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test-integration
jar
diff --git a/dubbo-test/pom.xml b/dubbo-test/pom.xml
index eb8e6da6b4d..a35beab9e5c 100644
--- a/dubbo-test/pom.xml
+++ b/dubbo-test/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-test
pom
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
index 7543c247fad..8ecaed2f0d5 100644
--- a/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
@@ -4,7 +4,7 @@
com.alibaba
dubbo-demo-lite-archetype
- 2.8.4a
+ 2.8.5-SNAPSHOT
maven-archetype
dubbo-demo-lite-archetype
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
index 932e4f6f148..3fc16e3c7df 100644
--- a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
@@ -18,7 +18,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
${artifactId}
${groupId}
@@ -35,7 +35,7 @@
com.alibaba
dubbo
- 2.8.4a
+ 2.8.5-SNAPSHOT
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
index ca60b9d181a..d47d47729d1 100644
--- a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo-lite
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo-lite-api
jar
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
index aca6849a04f..f98552ea6b7 100644
--- a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo-lite
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo-lite-consumer
jar
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
index 7b0330d6a1d..830f1a2b068 100644
--- a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-demo-lite
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo-lite-provider
war
diff --git a/dubbo-tool/dubbo-demo-lite/pom.xml b/dubbo-tool/dubbo-demo-lite/pom.xml
index 26e7e882a97..ea57787ac12 100644
--- a/dubbo-tool/dubbo-demo-lite/pom.xml
+++ b/dubbo-tool/dubbo-demo-lite/pom.xml
@@ -19,7 +19,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
dubbo-demo-lite
pom
@@ -39,7 +39,7 @@
com.alibaba
dubbo
- 2.8.4a
+ 2.8.5-SNAPSHOT
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index ad89e07b3eb..121b7689e57 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -19,8 +19,8 @@
com.alibaba
dubbo-parent
-
- 2.8.4a
+
+ 2.8.5-SNAPSHOT
dubbo
jar
@@ -54,37 +54,37 @@
dubbo-remoting-netty
${project.parent.version}
-
- com.alibaba
- dubbo-remoting-mina
- ${project.parent.version}
-
-
- org.apache.mina
- mina-core
-
-
- org.slf4j
- slf4j-api
-
-
-
-
- com.alibaba
- dubbo-remoting-grizzly
- ${project.parent.version}
-
-
- org.glassfish.grizzly
- grizzly-core
-
-
-
-
- com.alibaba
- dubbo-remoting-p2p
- ${project.parent.version}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.alibaba
dubbo-remoting-http
@@ -118,22 +118,22 @@
dubbo-rpc-injvm
${project.parent.version}
-
- com.alibaba
- dubbo-rpc-rmi
- ${project.parent.version}
-
-
- com.alibaba
- dubbo-rpc-hessian
- ${project.parent.version}
-
-
- com.caucho
- hessian
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.alibaba
dubbo-rpc-http
@@ -145,54 +145,54 @@
-
- com.alibaba
- dubbo-rpc-webservice
- ${project.parent.version}
-
-
- org.apache.cxf
- cxf-rt-frontend-simple
-
-
- org.apache.cxf
- cxf-rt-transports-http
-
-
-
-
- com.alibaba
- dubbo-rpc-thrift
- ${project.parent.version}
-
-
- org.apache.thrift
- libthrift
-
-
-
-
- com.alibaba
- dubbo-rpc-memcached
- ${project.parent.version}
-
-
- com.googlecode.xmemcached
- xmemcached
-
-
-
-
- com.alibaba
- dubbo-rpc-redis
- ${project.parent.version}
-
-
- redis.clients
- jedis
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
com.alibaba
dubbo-rpc-rest
@@ -306,11 +306,11 @@
-
- com.alibaba
- dubbo-container-log4j
- ${project.parent.version}
-
+
+
+
+
+
com.alibaba
dubbo-container-logback
@@ -333,6 +333,25 @@
+
+ com.alibaba
+ dubbo-rpc-grpc
+ ${project.parent.version}
+
+
+ io.grpc
+ grpc-netty
+
+
+ io.grpc
+ grpc-protobuf
+
+
+ io.grpc
+ grpc-stub
+
+
+
com.alibaba
dubbo-rpc-avro
@@ -405,32 +424,33 @@
com.alibaba:dubbo-common
com.alibaba:dubbo-remoting-api
com.alibaba:dubbo-remoting-netty
- com.alibaba:dubbo-remoting-mina
- com.alibaba:dubbo-remoting-grizzly
- com.alibaba:dubbo-remoting-p2p
+
+
+
com.alibaba:dubbo-remoting-http
com.alibaba:dubbo-remoting-zookeeper
com.alibaba:dubbo-rpc-api
com.alibaba:dubbo-rpc-avro
com.alibaba:dubbo-rpc-default
- com.alibaba:dubbo-rpc-injvm
+
com.alibaba:dubbo-rpc-rmi
- com.alibaba:dubbo-rpc-hessian
+
com.alibaba:dubbo-rpc-http
- com.alibaba:dubbo-rpc-webservice
- com.alibaba:dubbo-rpc-thrift
+
+
com.alibaba:dubbo-rpc-thrift2
- com.alibaba:dubbo-rpc-memcached
- com.alibaba:dubbo-rpc-redis
+ com.alibaba:dubbo-rpc-grpc
+
+
com.alibaba:dubbo-rpc-rest
com.alibaba:dubbo-filter-validation
com.alibaba:dubbo-filter-cache
com.alibaba:dubbo-cluster
com.alibaba:dubbo-registry-api
com.alibaba:dubbo-registry-default
- com.alibaba:dubbo-registry-multicast
+
com.alibaba:dubbo-registry-zookeeper
- com.alibaba:dubbo-registry-redis
+
com.alibaba:dubbo-monitor-api
com.alibaba:dubbo-monitor-default
com.alibaba:dubbo-config-api
@@ -438,8 +458,8 @@
com.alibaba:dubbo-container-api
com.alibaba:dubbo-container-spring
com.alibaba:dubbo-container-javaconfig
- com.alibaba:dubbo-container-jetty
- com.alibaba:dubbo-container-log4j
+
+
com.alibaba:dubbo-container-logback
diff --git a/hessian-lite/pom.xml b/hessian-lite/pom.xml
index f0cf07b3b42..6f122372527 100644
--- a/hessian-lite/pom.xml
+++ b/hessian-lite/pom.xml
@@ -6,7 +6,7 @@
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
hessian-lite
jar
diff --git a/pom.xml b/pom.xml
index 9709ac39629..f9d566acbe4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
4.0.0
com.alibaba
dubbo-parent
- 2.8.4a
+ 2.8.5-SNAPSHOT
pom
${project.artifactId}
The parent project of dubbo
@@ -47,10 +47,10 @@
dubbo-monitor
dubbo-config
dubbo
- dubbo-simple
- dubbo-admin
- dubbo-demo
- hessian-lite
+
+
+
+
@@ -62,7 +62,7 @@
- dubbo-test
+
@@ -99,9 +99,10 @@
1.2.6
3.1
0.8
- 3.4.6
+ 3.4.8
0.8.1
+
2.5.0
2.1.0
1.3.6
From f2752cc59ef62dbd075c47d39f1bdd82427e840f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Sat, 8 Oct 2016 19:50:21 +0800
Subject: [PATCH 21/32] modify readme
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 6792d86ab58..4685709d953 100644
--- a/README.md
+++ b/README.md
@@ -78,8 +78,8 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* 增加原生thrift支持,升级thrift到0.9.3,为避免与dubbo原来的thrift实现命名冲突,新增的原生thrift协议,协议名称改为thrift2(杨俊明)
* 增加hadoop avro支持(杨俊明)
* **2.8.5-SNAPSHOT**:
- * 编译时去掉了一些不常用的模块,以加快项目整体的编译速度(杨俊明)
- * 增加了google-gRPC-1.0.1的支持,目前仅处于“玩票”阶段,生产环境请慎用(杨俊明)
+ * 编译时去掉了一些不常用的模块,以加快项目整体的编译速度(杨俊明)
+ * 增加了google-gRPC-1.0.1的支持,目前仅处于“玩票”阶段,生产环境请慎用(杨俊明)
## 依赖
From 02bbf68e8581692662a529eb10ebd159869a4110 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Sat, 8 Oct 2016 19:51:02 +0800
Subject: [PATCH 22/32] change readme
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4685709d953..8b3855dec39 100644
--- a/README.md
+++ b/README.md
@@ -77,7 +77,7 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* 增加log4j2支持,原来一些硬编码依赖log4j的代码,改为依赖slf4j,以便兼容其它一些主流日志组件(杨俊明)
* 增加原生thrift支持,升级thrift到0.9.3,为避免与dubbo原来的thrift实现命名冲突,新增的原生thrift协议,协议名称改为thrift2(杨俊明)
* 增加hadoop avro支持(杨俊明)
-* **2.8.5-SNAPSHOT**:
+* **dubbox-2.8.5-SNAPSHOT**:
* 编译时去掉了一些不常用的模块,以加快项目整体的编译速度(杨俊明)
* 增加了google-gRPC-1.0.1的支持,目前仅处于“玩票”阶段,生产环境请慎用(杨俊明)
From d1a8f0bdb9c241699ae91fd3abf05624c1ff1f80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Sat, 8 Oct 2016 19:51:27 +0800
Subject: [PATCH 23/32] change readme
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 8b3855dec39..5c59126c44e 100644
--- a/README.md
+++ b/README.md
@@ -77,7 +77,7 @@ Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the p
* 增加log4j2支持,原来一些硬编码依赖log4j的代码,改为依赖slf4j,以便兼容其它一些主流日志组件(杨俊明)
* 增加原生thrift支持,升级thrift到0.9.3,为避免与dubbo原来的thrift实现命名冲突,新增的原生thrift协议,协议名称改为thrift2(杨俊明)
* 增加hadoop avro支持(杨俊明)
-* **dubbox-2.8.5-SNAPSHOT**:
+* **dubbox-2.8.5**:
* 编译时去掉了一些不常用的模块,以加快项目整体的编译速度(杨俊明)
* 增加了google-gRPC-1.0.1的支持,目前仅处于“玩票”阶段,生产环境请慎用(杨俊明)
From 6f7a94d5a3cd91a4727f317ba5f6a246045d60c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Wed, 2 Nov 2016 22:12:44 +0800
Subject: [PATCH 24/32] grpc
---
.../java/com/alibaba/dubbo/common/URL.java | 1 +
dubbo-container/pom.xml | 4 +-
.../registry/zookeeper/ZookeeperRegistry.java | 94 ++++++------
dubbo-registry/pom.xml | 4 +-
.../dubbo/rpc/protocol/avro/AvroProtocol.java | 2 +
.../rpc/protocol/thrift2/Thrift2Protocol.java | 134 +++++++++++++++---
dubbo/pom.xml | 78 +++++-----
pom.xml | 41 ++----
8 files changed, 221 insertions(+), 137 deletions(-)
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/URL.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/URL.java
index 6a275e314c8..cdacfa06a75 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/URL.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/URL.java
@@ -235,6 +235,7 @@ public static URL valueOf(String url) {
url = url.substring(i + 1);
}
i = url.indexOf(":");
+ //fe80:0:0:0:fc83:51ff:fe41:9c76%9:20880 此处有bug,如果是ipv6就挂了
if (i >= 0 && i < url.length() - 1) {
port = Integer.parseInt(url.substring(i + 1));
url = url.substring(0, i);
diff --git a/dubbo-container/pom.xml b/dubbo-container/pom.xml
index 59b62f003a3..4b074e66d8b 100644
--- a/dubbo-container/pom.xml
+++ b/dubbo-container/pom.xml
@@ -32,8 +32,8 @@
dubbo-container-api
dubbo-container-spring
dubbo-container-javaconfig
- dubbo-container-jetty
+
- dubbo-container-logback
+
diff --git a/dubbo-registry/dubbo-registry-zookeeper/src/main/java/com/alibaba/dubbo/registry/zookeeper/ZookeeperRegistry.java b/dubbo-registry/dubbo-registry-zookeeper/src/main/java/com/alibaba/dubbo/registry/zookeeper/ZookeeperRegistry.java
index 1a39435f964..ecf42042c65 100644
--- a/dubbo-registry/dubbo-registry-zookeeper/src/main/java/com/alibaba/dubbo/registry/zookeeper/ZookeeperRegistry.java
+++ b/dubbo-registry/dubbo-registry-zookeeper/src/main/java/com/alibaba/dubbo/registry/zookeeper/ZookeeperRegistry.java
@@ -15,12 +15,6 @@
*/
package com.alibaba.dubbo.registry.zookeeper;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.logger.Logger;
@@ -30,14 +24,20 @@
import com.alibaba.dubbo.registry.NotifyListener;
import com.alibaba.dubbo.registry.support.FailbackRegistry;
import com.alibaba.dubbo.remoting.zookeeper.ChildListener;
-import com.alibaba.dubbo.remoting.zookeeper.ZookeeperClient;
import com.alibaba.dubbo.remoting.zookeeper.StateListener;
+import com.alibaba.dubbo.remoting.zookeeper.ZookeeperClient;
import com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter;
import com.alibaba.dubbo.rpc.RpcException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
/**
* ZookeeperRegistry
- *
+ *
* @author william.liangf
*/
public class ZookeeperRegistry extends FailbackRegistry {
@@ -45,37 +45,37 @@ public class ZookeeperRegistry extends FailbackRegistry {
private final static Logger logger = LoggerFactory.getLogger(ZookeeperRegistry.class);
private final static int DEFAULT_ZOOKEEPER_PORT = 2181;
-
+
private final static String DEFAULT_ROOT = "dubbo";
- private final String root;
-
+ private final String root;
+
private final Set anyServices = new ConcurrentHashSet();
private final ConcurrentMap> zkListeners = new ConcurrentHashMap>();
-
+
private final ZookeeperClient zkClient;
-
+
public ZookeeperRegistry(URL url, ZookeeperTransporter zookeeperTransporter) {
super(url);
if (url.isAnyHost()) {
- throw new IllegalStateException("registry address == null");
- }
+ throw new IllegalStateException("registry address == null");
+ }
String group = url.getParameter(Constants.GROUP_KEY, DEFAULT_ROOT);
- if (! group.startsWith(Constants.PATH_SEPARATOR)) {
+ if (!group.startsWith(Constants.PATH_SEPARATOR)) {
group = Constants.PATH_SEPARATOR + group;
}
this.root = group;
zkClient = zookeeperTransporter.connect(url);
zkClient.addStateListener(new StateListener() {
public void stateChanged(int state) {
- if (state == RECONNECTED) {
- try {
- recover();
- } catch (Exception e) {
- logger.error(e.getMessage(), e);
- }
- }
+ if (state == RECONNECTED) {
+ try {
+ recover();
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
}
});
}
@@ -95,7 +95,7 @@ public void destroy() {
protected void doRegister(URL url) {
try {
- zkClient.create(toUrlPath(url), url.getParameter(Constants.DYNAMIC_KEY, true));
+ zkClient.create(toUrlPath(url), url.getParameter(Constants.DYNAMIC_KEY, true));
} catch (Throwable e) {
throw new RpcException("Failed to register " + url + " to zookeeper " + getUrl() + ", cause: " + e.getMessage(), e);
}
@@ -123,10 +123,10 @@ protected void doSubscribe(final URL url, final NotifyListener listener) {
listeners.putIfAbsent(listener, new ChildListener() {
public void childChanged(String parentPath, List currentChilds) {
for (String child : currentChilds) {
- child = URL.decode(child);
- if (! anyServices.contains(child)) {
+ child = URL.decode(child);
+ if (!anyServices.contains(child)) {
anyServices.add(child);
- subscribe(url.setPath(child).addParameters(Constants.INTERFACE_KEY, child,
+ subscribe(url.setPath(child).addParameters(Constants.INTERFACE_KEY, child,
Constants.CHECK_KEY, String.valueOf(false)), listener);
}
}
@@ -138,9 +138,9 @@ public void childChanged(String parentPath, List currentChilds) {
List services = zkClient.addChildListener(root, zkListener);
if (services != null && services.size() > 0) {
for (String service : services) {
- service = URL.decode(service);
- anyServices.add(service);
- subscribe(url.setPath(service).addParameters(Constants.INTERFACE_KEY, service,
+ service = URL.decode(service);
+ anyServices.add(service);
+ subscribe(url.setPath(service).addParameters(Constants.INTERFACE_KEY, service,
Constants.CHECK_KEY, String.valueOf(false)), listener);
}
}
@@ -156,7 +156,7 @@ public void childChanged(String parentPath, List currentChilds) {
if (zkListener == null) {
listeners.putIfAbsent(listener, new ChildListener() {
public void childChanged(String parentPath, List currentChilds) {
- ZookeeperRegistry.this.notify(url, listener, toUrlsWithEmpty(url, parentPath, currentChilds));
+ ZookeeperRegistry.this.notify(url, listener, toUrlsWithEmpty(url, parentPath, currentChilds));
}
});
zkListener = listeners.get(listener);
@@ -164,7 +164,7 @@ public void childChanged(String parentPath, List currentChilds) {
zkClient.create(path, false);
List children = zkClient.addChildListener(path, zkListener);
if (children != null) {
- urls.addAll(toUrlsWithEmpty(url, path, children));
+ urls.addAll(toUrlsWithEmpty(url, path, children));
}
}
notify(url, listener, urls);
@@ -191,28 +191,28 @@ public List lookup(URL url) {
try {
List providers = new ArrayList();
for (String path : toCategoriesPath(url)) {
- List children = zkClient.getChildren(path);
- if (children != null) {
- providers.addAll(children);
- }
+ List children = zkClient.getChildren(path);
+ if (children != null) {
+ providers.addAll(children);
+ }
}
return toUrlsWithoutEmpty(url, providers);
} catch (Throwable e) {
throw new RpcException("Failed to lookup " + url + " from zookeeper " + getUrl() + ", cause: " + e.getMessage(), e);
}
}
-
+
private String toRootDir() {
if (root.equals(Constants.PATH_SEPARATOR)) {
return root;
}
return root + Constants.PATH_SEPARATOR;
}
-
+
private String toRootPath() {
return root;
}
-
+
private String toServicePath(URL url) {
String name = url.getServiceInterface();
if (Constants.ANY_VALUE.equals(name)) {
@@ -224,13 +224,13 @@ private String toServicePath(URL url) {
private String[] toCategoriesPath(URL url) {
String[] categroies;
if (Constants.ANY_VALUE.equals(url.getParameter(Constants.CATEGORY_KEY))) {
- categroies = new String[] {Constants.PROVIDERS_CATEGORY, Constants.CONSUMERS_CATEGORY,
+ categroies = new String[]{Constants.PROVIDERS_CATEGORY, Constants.CONSUMERS_CATEGORY,
Constants.ROUTERS_CATEGORY, Constants.CONFIGURATORS_CATEGORY};
} else {
- categroies = url.getParameter(Constants.CATEGORY_KEY, new String[] {Constants.DEFAULT_CATEGORY});
+ categroies = url.getParameter(Constants.CATEGORY_KEY, new String[]{Constants.DEFAULT_CATEGORY});
}
String[] paths = new String[categroies.length];
- for (int i = 0; i < categroies.length; i ++) {
+ for (int i = 0; i < categroies.length; i++) {
paths[i] = toServicePath(url) + Constants.PATH_SEPARATOR + categroies[i];
}
return paths;
@@ -243,9 +243,9 @@ private String toCategoryPath(URL url) {
private String toUrlPath(URL url) {
return toCategoryPath(url) + Constants.PATH_SEPARATOR + URL.encode(url.toFullString());
}
-
+
private List toUrlsWithoutEmpty(URL consumer, List providers) {
- List urls = new ArrayList();
+ List urls = new ArrayList();
if (providers != null && providers.size() > 0) {
for (String provider : providers) {
provider = URL.decode(provider);
@@ -263,9 +263,9 @@ private List toUrlsWithoutEmpty(URL consumer, List providers) {
private List toUrlsWithEmpty(URL consumer, String path, List providers) {
List urls = toUrlsWithoutEmpty(consumer, providers);
if (urls.isEmpty()) {
- int i = path.lastIndexOf('/');
- String category = i < 0 ? path : path.substring(i + 1);
- URL empty = consumer.setProtocol(Constants.EMPTY_PROTOCOL).addParameter(Constants.CATEGORY_KEY, category);
+ int i = path.lastIndexOf('/');
+ String category = i < 0 ? path : path.substring(i + 1);
+ URL empty = consumer.setProtocol(Constants.EMPTY_PROTOCOL).addParameter(Constants.CATEGORY_KEY, category);
urls.add(empty);
}
return urls;
diff --git a/dubbo-registry/pom.xml b/dubbo-registry/pom.xml
index 2c87426e5c2..c2006e49230 100644
--- a/dubbo-registry/pom.xml
+++ b/dubbo-registry/pom.xml
@@ -31,8 +31,8 @@
dubbo-registry-api
dubbo-registry-default
- dubbo-registry-multicast
+
dubbo-registry-zookeeper
- dubbo-registry-redis
+
diff --git a/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
index 281ae2740b7..4adabc44a74 100644
--- a/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-avro/src/main/java/com/alibaba/dubbo/rpc/protocol/avro/AvroProtocol.java
@@ -42,6 +42,8 @@ protected Runnable doExport(T impl, Class type, URL url)
new InetSocketAddress(url.getHost(), url.getPort()));
server.start();
+ logger.info("Start Avro Server");
+
return new Runnable() {
public void run() {
try {
diff --git a/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
index 6f2082430fe..9cea7c92fbf 100644
--- a/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
+++ b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
@@ -7,16 +7,17 @@
import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
import org.apache.thrift.TException;
import org.apache.thrift.TProcessor;
+import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TCompactProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.server.TNonblockingServer;
import org.apache.thrift.server.TServer;
-import org.apache.thrift.transport.TFramedTransport;
-import org.apache.thrift.transport.TNonblockingServerSocket;
-import org.apache.thrift.transport.TSocket;
-import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.server.TThreadPoolServer;
+import org.apache.thrift.transport.*;
import java.lang.reflect.Constructor;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
/**
* 为dubbo-rpc添加"原生thrift"支持
@@ -31,17 +32,11 @@ public int getDefaultPort() {
}
public Thrift2Protocol() {
- super(TException.class,RpcException.class);
+ super(TException.class, RpcException.class);
}
- @Override
- protected Runnable doExport(T impl, Class type, URL url)
+ private Runnable exportNonblockingServer(T impl, Class type, URL url)
throws RpcException {
-
- logger.info("impl => " + impl.getClass());
- logger.info("type => " + type.getName());
- logger.info("url => " + url);
-
TProcessor tprocessor;
TNonblockingServer.Args tArgs = null;
String iFace = "$Iface";
@@ -78,16 +73,16 @@ protected Runnable doExport(T impl, Class type, URL url)
new Thread(new Runnable() {
public void run() {
- logger.info("Start Thrift Server");
+ logger.info("1=>Start Thrift Server");
thriftServer.serve();
- logger.info("Thrift server started.");
+ logger.info("1=>Thrift server started.");
}
}).start();
return new Runnable() {
public void run() {
try {
- logger.info("Close Thrift Server");
+ logger.info("1=>Close Thrift Server");
thriftServer.stop();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
@@ -96,6 +91,72 @@ public void run() {
};
}
+ private Runnable exportThreadPoolServer(T impl, Class type, URL url)
+ throws RpcException {
+ TProcessor tprocessor;
+ TThreadPoolServer.Args tArgs = null;
+ String iFace = "$Iface";
+ String processor = "$Processor";
+ String typeName = type.getName();
+ TServerTransport transport;
+ if (typeName.endsWith(iFace)) {
+ String processorClsName = typeName.substring(0, typeName.indexOf(iFace)) + processor;
+ try {
+ Class> clazz = Class.forName(processorClsName);
+ Constructor constructor = clazz.getConstructor(type);
+ try {
+ tprocessor = (TProcessor) constructor.newInstance(impl);
+ transport = new TServerSocket(url.getPort());
+ tArgs = new TThreadPoolServer.Args(transport);
+ tArgs.processor(tprocessor);
+ tArgs.executorService(Executors.newFixedThreadPool(100));
+// tArgs.protocolFactory(new TBinaryProtocol.Factory());
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create thrift server(" + url + ") : " + e.getMessage(), e);
+ }
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create thrift server(" + url + ") : " + e.getMessage(), e);
+ }
+ }
+
+ if (tArgs == null) {
+ logger.error("Fail to create thrift server(" + url + ") due to null args");
+ throw new RpcException("Fail to create thrift server(" + url + ") due to null args");
+ }
+ final TServer thriftServer = new TThreadPoolServer(tArgs);
+
+ ExecutorService service = Executors.newFixedThreadPool(50);
+ service.submit(() -> {
+ logger.info("3=>Start Thrift Server");
+ thriftServer.serve();
+ logger.info("3=>Thrift server started.");
+ });
+
+ return () -> {
+ try {
+ logger.info("3=>Close Thrift Server");
+ thriftServer.stop();
+ } catch (Throwable e) {
+ logger.warn(e.getMessage(), e);
+ }
+ };
+ }
+
+
+ @Override
+ protected Runnable doExport(T impl, Class type, URL url)
+ throws RpcException {
+
+ logger.info("impl => " + impl.getClass());
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+
+ return exportNonblockingServer(impl, type, url);
+ //return exportThreadPoolServer(impl, type, url);
+ }
+
@Override
protected T doRefer(Class type, URL url) throws RpcException {
@@ -103,7 +164,6 @@ protected T doRefer(Class type, URL url) throws RpcException {
logger.info("url => " + url);
try {
- TSocket tSocket;
TTransport transport;
TProtocol protocol;
T thriftClient = null;
@@ -116,21 +176,53 @@ protected T doRefer(Class type, URL url) throws RpcException {
Class> clazz = Class.forName(clientClsName);
Constructor constructor = clazz.getConstructor(TProtocol.class);
try {
- tSocket = new TSocket(url.getHost(), url.getPort());
- transport = new TFramedTransport(tSocket);
- protocol = new TCompactProtocol(transport);
+ transport = new TSocket(url.getHost(), url.getPort());
+ protocol = new TBinaryProtocol(transport);
+ thriftClient = (T) constructor.newInstance(protocol);
+ transport.open();
+ logger.info("thrift client opened for service(" + url + ")");
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create remote client:" + e.getMessage(), e);
+ }
+ }
+ return thriftClient;
+ } catch (Exception e) {
+ logger.error(e.getMessage(), e);
+ throw new RpcException("Fail to create remote client for service(" + url + "): " + e.getMessage(), e);
+ }
+ }
+
+
+ private T doReferFrameAndCompact(Class type, URL url) throws RpcException {
+
+ try {
+ TTransport transport;
+ TProtocol protocol;
+ T thriftClient = null;
+ String iFace = "$Iface";
+ String client = "$Client";
+
+ String typeName = type.getName();
+ if (typeName.endsWith(iFace)) {
+ String clientClsName = typeName.substring(0, typeName.indexOf(iFace)) + client;
+ Class> clazz = Class.forName(clientClsName);
+ Constructor constructor = clazz.getConstructor(TProtocol.class);
+ try {
+ transport = new TSocket(url.getHost(), url.getPort());
+ protocol = new TBinaryProtocol(transport);
thriftClient = (T) constructor.newInstance(protocol);
transport.open();
logger.info("thrift client opened for service(" + url + ")");
} catch (Exception e) {
logger.error(e.getMessage(), e);
- throw new RpcException("Fail to create remoting client:" + e.getMessage(), e);
+ throw new RpcException("Fail to create remote client:" + e.getMessage(), e);
}
}
return thriftClient;
} catch (Exception e) {
logger.error(e.getMessage(), e);
- throw new RpcException("Fail to create remoting client for service(" + url + "): " + e.getMessage(), e);
+ throw new RpcException("Fail to create remote client for service(" + url + "): " + e.getMessage(), e);
}
}
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index 121b7689e57..5c9c2f9eca1 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -245,11 +245,11 @@
dubbo-registry-default
${project.parent.version}
-
- com.alibaba
- dubbo-registry-multicast
- ${project.parent.version}
-
+
+
+
+
+
com.alibaba
dubbo-registry-zookeeper
@@ -269,17 +269,17 @@
-
- com.alibaba
- dubbo-registry-redis
- ${project.parent.version}
-
-
- redis.clients
- jedis
-
-
-
+
+
+
+
+
+
+
+
+
+
+
com.alibaba
dubbo-monitor-default
@@ -295,33 +295,33 @@
dubbo-container-javaconfig
${project.parent.version}
-
- com.alibaba
- dubbo-container-jetty
- ${project.parent.version}
-
-
- org.mortbay.jetty
- jetty
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
- com.alibaba
- dubbo-container-logback
- ${project.parent.version}
-
-
- ch.qos.logback
- logback-classic
-
-
-
+
+
+
+
+
+
+
+
+
+
+
com.alibaba
dubbo-rpc-thrift2
@@ -460,7 +460,7 @@
com.alibaba:dubbo-container-javaconfig
- com.alibaba:dubbo-container-logback
+
diff --git a/pom.xml b/pom.xml
index f9d566acbe4..8c497085ade 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,31 +82,22 @@
-
4.2.4.RELEASE
3.15.0-GA
-
3.9.9.Final
1.1.7
-
2.1.4
-
4.3.4
3.2.1-fixed-2
-
1.4.8
-
1.2.6
3.1
0.8
3.4.8
-
0.8.1
-
2.5.0
2.1.0
1.3.6
-
3.1.5
0.8.0
0.9.3
@@ -116,7 +107,6 @@
3.1.0
6.1.26
1.1.0.Final
-
5.2.4.Final
2.2.4
2.2.4
@@ -125,21 +115,16 @@
2.0-M5.1
3.0
2.2
-
3.1.6
-
2.7.1
1.6
2.6
8.0.11
-
1.7.15
1.1
-
1.2.17
-
1.1.5
2.5
@@ -179,9 +164,10 @@
oss
- 2.3.2
- 1.6
- 1.6
+
+ 3.6.0
+ 1.8
+ 1.8
UTF-8
2.1.1
@@ -302,7 +288,8 @@
org.apache.thrift
libthrift
- ${thrift_version}
+
+ ${thrift2_version}
org.apache.avro
@@ -707,7 +694,7 @@
maven-dependency-plugin
- [2.1,)
+ [2.5,)
unpack
@@ -809,10 +796,12 @@
-
-
-
-
-
-
+
+
+
+ 9now
+ http://114.80.88.52:9001/nexus/content/repositories/jichu-snapshots/
+
+
+
From 9238a8366dd56d0a7255697656ae5d2e0fde4a97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E4=BF=8A=E6=98=8E?=
Date: Tue, 15 Nov 2016 09:38:13 +0800
Subject: [PATCH 25/32] add rpc-grpc protocal
---
dubbo-demo/dubbo-demo-api/pom.xml | 105 ++++++---
.../dubbo-demo-api/src/main/avro/hello.avdl | 5 +
.../demo/SerializationOptimizerImpl.java | 49 ----
.../alibaba/dubbo/demo/bid/BidRequest.java | 55 -----
.../alibaba/dubbo/demo/bid/BidResponse.java | 44 ----
.../alibaba/dubbo/demo/bid/BidService.java | 23 --
.../com/alibaba/dubbo/demo/bid/Device.java | 79 -------
.../java/com/alibaba/dubbo/demo/bid/Geo.java | 61 -----
.../alibaba/dubbo/demo/bid/Impression.java | 43 ----
.../com/alibaba/dubbo/demo/bid/SeatBid.java | 44 ----
.../demo/extension/ClientTraceFilter.java | 36 ---
.../demo/extension/CustomExceptionMapper.java | 34 ---
.../demo/extension/DynamicTraceBinding.java | 30 ---
.../extension/DynamicTraceInterceptor.java | 42 ----
.../dubbo/demo/extension/TraceFilter.java | 39 ----
.../demo/extension/TraceInterceptor.java | 42 ----
.../dubbo/demo/hello/HelloService.java | 23 --
.../com/alibaba/dubbo/demo/user/User.java | 77 -------
.../alibaba/dubbo/demo/user/UserService.java | 25 ---
.../user/facade/AnotherUserRestService.java | 30 ---
.../demo/user/facade/RegistrationResult.java | 45 ----
.../demo/user/facade/UserRestService.java | 40 ----
.../service/api/dubbo/DubboHelloService.java | 11 +
.../yjmyzz/demo/service/api/dubbo/User.java | 37 +++
.../service/api/rest/RestHelloService.java | 21 ++
.../dubbo-demo-api/src/main/proto/hello.proto | 17 ++
.../src/main/thrift/hello.thrift | 5 +
.../src/main/assembly/assembly.xml | 39 ----
.../src/main/assembly/conf/dubbo.properties | 25 ---
.../dubbo/demo/consumer/DemoAction.java | 89 --------
.../demo/consumer/DemoJavaConfigAction.java | 87 --------
.../javaconfig/DubboDemoActionConfig.java | 33 ---
.../javaconfig/DubboDemoConsumerConfig.java | 56 -----
.../META-INF/spring/dubbo-demo-action.xml | 28 ---
.../META-INF/spring/dubbo-demo-consumer.xml | 21 --
.../dubbo/demo/consumer/DemoConsumer.java | 24 --
.../demo/consumer/DemoJavaConfigConsumer.java | 27 ---
.../dubbo/demo/consumer/RestClient.java | 104 ---------
.../dubbo/demo/bid/BidServiceImpl.java | 43 ----
.../dubbo/demo/hello/HelloServiceImpl.java | 26 ---
.../dubbo/demo/user/UserServiceImpl.java | 36 ---
.../AnnotationDrivenUserRestServiceImpl.java | 64 ------
.../facade/AnotherUserRestServiceImpl.java | 42 ----
.../demo/user/facade/UserRestServiceImpl.java | 71 ------
.../demo/service/impl/DubboDemoProvider.java | 19 ++
.../service/impl/avro/HelloServiceImpl.java | 17 ++
.../service/impl/dubbo/HelloServiceImpl.java | 23 ++
.../service/impl/grpc/HelloServiceImpl.java | 34 +++
.../service/impl/rest/HelloServiceImpl.java | 27 +++
.../service/impl/thrift/HelloServiceImpl.java | 17 ++
.../META-INF/spring/service-provider.xml | 85 -------
.../src/main/resources/spring-context.xml | 0
.../main/resources/spring-dubbo-provider.xml | 35 +++
.../src/main/webapp/WEB-INF/web.xml | 30 ---
.../dubbo/demo/provider/DemoProvider.java | 36 ---
dubbo-demo/pom.xml | 211 ++++++++++++++++--
dubbo-registry/pom.xml | 4 +-
dubbo-remoting/pom.xml | 6 +-
.../rpc/protocol/thrift2/Thrift2Protocol.java | 61 ++---
dubbo-rpc/pom.xml | 10 +-
dubbo/pom.xml | 26 +--
61 files changed, 589 insertions(+), 1929 deletions(-)
create mode 100644 dubbo-demo/dubbo-demo-api/src/main/avro/hello.avdl
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/SerializationOptimizerImpl.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidRequest.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidResponse.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidService.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Device.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Geo.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Impression.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/SeatBid.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/ClientTraceFilter.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/CustomExceptionMapper.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceBinding.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceInterceptor.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceFilter.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceInterceptor.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/hello/HelloService.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/User.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/UserService.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestService.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/RegistrationResult.java
delete mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestService.java
create mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/DubboHelloService.java
create mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/User.java
create mode 100644 dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/rest/RestHelloService.java
create mode 100644 dubbo-demo/dubbo-demo-api/src/main/proto/hello.proto
create mode 100644 dubbo-demo/dubbo-demo-api/src/main/thrift/hello.thrift
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/assembly/assembly.xml
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoAction.java
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigAction.java
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoActionConfig.java
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoConsumerConfig.java
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-action.xml
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoConsumer.java
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigConsumer.java
delete mode 100644 dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/RestClient.java
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/bid/BidServiceImpl.java
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/hello/HelloServiceImpl.java
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/UserServiceImpl.java
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnnotationDrivenUserRestServiceImpl.java
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestServiceImpl.java
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestServiceImpl.java
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/avro/HelloServiceImpl.java
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/dubbo/HelloServiceImpl.java
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/rest/HelloServiceImpl.java
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/thrift/HelloServiceImpl.java
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/resources/spring-context.xml
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml
delete mode 100644 dubbo-demo/dubbo-demo-provider/src/test/java/com/alibaba/dubbo/demo/provider/DemoProvider.java
diff --git a/dubbo-demo/dubbo-demo-api/pom.xml b/dubbo-demo/dubbo-demo-api/pom.xml
index 26bbe1f8e97..f22c3f5969b 100644
--- a/dubbo-demo/dubbo-demo-api/pom.xml
+++ b/dubbo-demo/dubbo-demo-api/pom.xml
@@ -25,36 +25,77 @@
jar
${project.artifactId}
The demo module of dubbo project
-
- true
-
-
-
- com.alibaba
- dubbo
- ${project.parent.version}
-
-
- javax.servlet
- javax.servlet-api
-
-
- javax.validation
- validation-api
-
-
- javax.ws.rs
- javax.ws.rs-api
-
-
- javax.annotation
- javax.annotation-api
- 1.2
-
-
- org.codehaus.jackson
- jackson-mapper-asl
- 1.9.12
-
-
+
+
+
+
+ kr.motd.maven
+ os-maven-plugin
+ 1.4.1.Final
+
+
+
+
+ org.xolstice.maven.plugins
+ protobuf-maven-plugin
+ 0.5.0
+
+ com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}
+ grpc-java
+ io.grpc:protoc-gen-grpc-java:1.0.1:exe:${os.detected.classifier}
+
+
+
+
+ compile
+ compile-custom
+
+
+
+
+
+
+ org.apache.thrift.tools
+ maven-thrift-plugin
+ 0.1.11
+
+ /usr/local/bin/thrift
+
+
+
+ thrift-sources
+ generate-sources
+
+ compile
+
+
+
+ thrift-test-sources
+ generate-test-sources
+
+ testCompile
+
+
+
+
+
+
+ org.apache.avro
+ avro-maven-plugin
+ 1.8.1
+
+
+ schemas
+ generate-sources
+
+ schema
+ protocol
+ idl-protocol
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-api/src/main/avro/hello.avdl b/dubbo-demo/dubbo-demo-api/src/main/avro/hello.avdl
new file mode 100644
index 00000000000..bf433cf77af
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/avro/hello.avdl
@@ -0,0 +1,5 @@
+@namespace ("com.cnblogs.yjmyzz.demo.service.api.avro")
+protocol AvroHelloService
+{
+ string ping();
+}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/SerializationOptimizerImpl.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/SerializationOptimizerImpl.java
deleted file mode 100644
index 881ba9b49b4..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/SerializationOptimizerImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo;
-
-import com.alibaba.dubbo.common.serialize.support.SerializationOptimizer;
-import com.alibaba.dubbo.demo.bid.BidRequest;
-import com.alibaba.dubbo.demo.bid.BidResponse;
-import com.alibaba.dubbo.demo.bid.Device;
-import com.alibaba.dubbo.demo.bid.Geo;
-import com.alibaba.dubbo.demo.bid.Impression;
-import com.alibaba.dubbo.demo.bid.SeatBid;
-import com.alibaba.dubbo.demo.user.User;
-
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-/**
- * This class must be accessible from both the provider and consumer
- *
- * @author lishen
- */
-public class SerializationOptimizerImpl implements SerializationOptimizer {
-
- public Collection getSerializableClasses() {
- List classes = new LinkedList();
- classes.add(BidRequest.class);
- classes.add(BidResponse.class);
- classes.add(Device.class);
- classes.add(Geo.class);
- classes.add(Impression.class);
- classes.add(SeatBid.class);
- classes.add(User.class);
- return classes;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidRequest.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidRequest.java
deleted file mode 100644
index 905be3e4cf8..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidRequest.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @author lishen
- */
-public class BidRequest implements Serializable {
-
- private String id;
-
- private Device device;
-
- private List impressions;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public Device getDevice() {
- return device;
- }
-
- public void setDevice(Device device) {
- this.device = device;
- }
-
- public List getImpressions() {
- return impressions;
- }
-
- public void setImpressions(List impressions) {
- this.impressions = impressions;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidResponse.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidResponse.java
deleted file mode 100644
index e5b26b425de..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidResponse.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @author lishen
- */
-public class BidResponse implements Serializable {
-
- private String id;
- private List seatBids;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public List getSeatBids() {
- return seatBids;
- }
-
- public void setSeatBids(List seatBids) {
- this.seatBids = seatBids;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidService.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidService.java
deleted file mode 100644
index 31ed65d0ad4..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-public interface BidService {
-
- BidResponse bid(BidRequest request);
-
- void throwNPE() throws NullPointerException;
-}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Device.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Device.java
deleted file mode 100644
index 81dcab6960f..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Device.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-import java.io.Serializable;
-
-/**
- * @author lishen
- */
-public class Device implements Serializable {
-
- private String os;
- private String make;
- private String version;
- private String model;
- private String lang;
- private Geo geo;
-
- public String getOs() {
- return os;
- }
-
- public void setOs(String os) {
- this.os = os;
- }
-
- public String getMake() {
- return make;
- }
-
- public void setMake(String make) {
- this.make = make;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public String getModel() {
- return model;
- }
-
- public void setModel(String model) {
- this.model = model;
- }
-
- public String getLang() {
- return lang;
- }
-
- public void setLang(String lang) {
- this.lang = lang;
- }
-
- public Geo getGeo() {
- return geo;
- }
-
- public void setGeo(Geo geo) {
- this.geo = geo;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Geo.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Geo.java
deleted file mode 100644
index ddbe6b2e547..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Geo.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-import java.io.Serializable;
-
-/**
- * @author lishen
- */
-public class Geo implements Serializable {
-
- private float lon;
- private float lat;
- private String country;
- private String city;
-
- public float getLon() {
- return lon;
- }
-
- public void setLon(float lon) {
- this.lon = lon;
- }
-
- public float getLat() {
- return lat;
- }
-
- public void setLat(float lat) {
- this.lat = lat;
- }
-
- public String getCountry() {
- return country;
- }
-
- public void setCountry(String country) {
- this.country = country;
- }
-
- public String getCity() {
- return city;
- }
-
- public void setCity(String city) {
- this.city = city;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Impression.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Impression.java
deleted file mode 100644
index 2b4cddfc559..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Impression.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-import java.io.Serializable;
-
-/**
- * @author lishen
- */
-public class Impression implements Serializable {
-
- private String id;
- private double bidFloor;
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public double getBidFloor() {
- return bidFloor;
- }
-
- public void setBidFloor(double bidFloor) {
- this.bidFloor = bidFloor;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/SeatBid.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/SeatBid.java
deleted file mode 100644
index 8e852e657b5..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/SeatBid.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-import java.io.Serializable;
-
-/**
- * @author lishen
- */
-public class SeatBid implements Serializable {
-
- private String seat;
-
- private String group;
-
- public String getSeat() {
- return seat;
- }
-
- public void setSeat(String seat) {
- this.seat = seat;
- }
-
- public String getGroup() {
- return group;
- }
-
- public void setGroup(String group) {
- this.group = group;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/ClientTraceFilter.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/ClientTraceFilter.java
deleted file mode 100644
index 8796e71b880..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/ClientTraceFilter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.extension;
-
-import javax.ws.rs.client.ClientRequestContext;
-import javax.ws.rs.client.ClientRequestFilter;
-import javax.ws.rs.client.ClientResponseContext;
-import javax.ws.rs.client.ClientResponseFilter;
-import java.io.IOException;
-
-/**
- * @author lishen
- */
-public class ClientTraceFilter implements ClientRequestFilter, ClientResponseFilter {
-
- public void filter(ClientRequestContext requestContext) throws IOException {
- System.out.println("Client request filter invoked");
- }
-
- public void filter(ClientRequestContext clientRequestContext, ClientResponseContext clientResponseContext) throws IOException {
- System.out.println("Client response filter invoked");
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/CustomExceptionMapper.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/CustomExceptionMapper.java
deleted file mode 100644
index 82397901ab9..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/CustomExceptionMapper.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.extension;
-
-import com.alibaba.dubbo.rpc.RpcContext;
-
-import javax.ws.rs.NotFoundException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.ext.ExceptionMapper;
-
-/**
- * @author lishen
- */
-public class CustomExceptionMapper implements ExceptionMapper {
-
- public Response toResponse(NotFoundException e) {
- System.out.println("Exception mapper successfully got an exception: " + e + ":" + e.getMessage());
- System.out.println("Client IP is " + RpcContext.getContext().getRemoteAddressString());
- return Response.status(Response.Status.NOT_FOUND).entity("Oops! the requested resource is not found!").type("text/plain").build();
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceBinding.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceBinding.java
deleted file mode 100644
index 27e6521bd80..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceBinding.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.extension;
-
-import javax.ws.rs.container.DynamicFeature;
-import javax.ws.rs.container.ResourceInfo;
-import javax.ws.rs.core.FeatureContext;
-
-/**
- * @author lishen
- */
-public class DynamicTraceBinding implements DynamicFeature {
-
- public void configure(ResourceInfo resourceInfo, FeatureContext context) {
- context.register(DynamicTraceInterceptor.class);
- }
-}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceInterceptor.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceInterceptor.java
deleted file mode 100644
index f8b8203e01c..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceInterceptor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.extension;
-
-import javax.annotation.Priority;
-import javax.ws.rs.Priorities;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.ext.ReaderInterceptor;
-import javax.ws.rs.ext.ReaderInterceptorContext;
-import javax.ws.rs.ext.WriterInterceptor;
-import javax.ws.rs.ext.WriterInterceptorContext;
-import java.io.IOException;
-
-/**
- * @author lishen
- */
-@Priority(Priorities.USER)
-public class DynamicTraceInterceptor implements ReaderInterceptor, WriterInterceptor {
-
- public Object aroundReadFrom(ReaderInterceptorContext readerInterceptorContext) throws IOException, WebApplicationException {
- System.out.println("Dynamic reader interceptor invoked");
- return readerInterceptorContext.proceed();
- }
-
- public void aroundWriteTo(WriterInterceptorContext writerInterceptorContext) throws IOException, WebApplicationException {
- System.out.println("Dynamic writer interceptor invoked");
- writerInterceptorContext.proceed();
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceFilter.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceFilter.java
deleted file mode 100644
index 91277002837..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceFilter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.extension;
-
-import javax.annotation.Priority;
-import javax.ws.rs.Priorities;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
-import java.io.IOException;
-
-/**
- * @author lishen
- */
-@Priority(Priorities.USER)
-public class TraceFilter implements ContainerRequestFilter, ContainerResponseFilter {
-
- public void filter(ContainerRequestContext requestContext) throws IOException {
- System.out.println("Request filter invoked");
- }
-
- public void filter(ContainerRequestContext containerRequestContext, ContainerResponseContext containerResponseContext) throws IOException {
- System.out.println("Response filter invoked");
- }
-}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceInterceptor.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceInterceptor.java
deleted file mode 100644
index f8c25fc585b..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceInterceptor.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.extension;
-
-import javax.annotation.Priority;
-import javax.ws.rs.Priorities;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.ext.ReaderInterceptor;
-import javax.ws.rs.ext.ReaderInterceptorContext;
-import javax.ws.rs.ext.WriterInterceptor;
-import javax.ws.rs.ext.WriterInterceptorContext;
-import java.io.IOException;
-
-/**
- * @author lishen
- */
-@Priority(Priorities.USER)
-public class TraceInterceptor implements ReaderInterceptor, WriterInterceptor {
-
- public Object aroundReadFrom(ReaderInterceptorContext readerInterceptorContext) throws IOException, WebApplicationException {
- System.out.println("Reader interceptor invoked");
- return readerInterceptorContext.proceed();
- }
-
- public void aroundWriteTo(WriterInterceptorContext writerInterceptorContext) throws IOException, WebApplicationException {
- System.out.println("Writer interceptor invoked");
- writerInterceptorContext.proceed();
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/hello/HelloService.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/hello/HelloService.java
deleted file mode 100644
index 297e7915e21..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/hello/HelloService.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.hello;
-
-/**
- * @author lishen
- */
-public interface HelloService {
- String hello(String name);
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/User.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/User.java
deleted file mode 100644
index eb5a3b86f3c..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/User.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user;
-
-import org.codehaus.jackson.annotate.JsonProperty;
-
-import javax.validation.constraints.Min;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-/**
- * @author lishen
- */
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class User implements Serializable {
-
- @NotNull
- @Min(1L)
- private Long id;
-
- @JsonProperty("username")
- @XmlElement(name = "username")
- @NotNull
- @Size(min = 6, max = 50)
- private String name;
-
- public User() {
- }
-
- public User(Long id, String name) {
- this.id = id;
- this.name = name;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Override
- public String toString() {
- return "User (" +
- "id=" + id +
- ", name='" + name + '\'' +
- ')';
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/UserService.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/UserService.java
deleted file mode 100644
index 74782f25c6e..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/UserService.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user;
-
-/**
- * @author lishen
- */
-public interface UserService {
- User getUser(Long id);
-
- Long registerUser(User user);
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestService.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestService.java
deleted file mode 100644
index 91ab166133e..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestService.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.alibaba.dubbo.demo.user.facade;
-
-import com.alibaba.dubbo.demo.user.User;
-import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
-
-import javax.validation.constraints.Min;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-/**
- * @author lishen
- */
-@Path("u")
-@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
-@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
-public interface AnotherUserRestService {
-
- @GET
- @Path("{id : \\d+}")
- User getUser(@PathParam("id") @Min(1L) Long id);
-
- @POST
- @Path("register")
- RegistrationResult registerUser(User user);
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/RegistrationResult.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/RegistrationResult.java
deleted file mode 100644
index 1924ed0c805..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/RegistrationResult.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user.facade;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-
-/**
- * DTO to customize the returned message
- *
- * @author lishen
- */
-@XmlRootElement
-public class RegistrationResult implements Serializable {
-
- private Long id;
-
- public RegistrationResult() {
- }
-
- public RegistrationResult(Long id) {
- this.id = id;
- }
-
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestService.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestService.java
deleted file mode 100644
index 87f28fcd982..00000000000
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user.facade;
-
-import com.alibaba.dubbo.demo.user.User;
-
-import javax.validation.constraints.Min;
-
-/**
- * This interface acts as some kind of service broker for the original UserService
-
- * Here we want to simulate the twitter/weibo rest api, e.g.
- *
- * http://localhost:8888/user/1.json
- * http://localhost:8888/user/1.xml
- *
- * @author lishen
- */
-public interface UserRestService {
-
- /**
- * the request object is just used to test jax-rs injection.
- */
- User getUser(@Min(value=1L, message="User ID must be greater than 1") Long id/*, HttpServletRequest request*/);
-
- RegistrationResult registerUser(User user);
-}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/DubboHelloService.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/DubboHelloService.java
new file mode 100644
index 00000000000..6f03196df81
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/DubboHelloService.java
@@ -0,0 +1,11 @@
+package com.cnblogs.yjmyzz.demo.service.api.dubbo;
+
+/**
+ * Created by yangjunming on 2016/11/2.
+ */
+public interface DubboHelloService {
+
+ String ping();
+
+ String register(User user);
+}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/User.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/User.java
new file mode 100644
index 00000000000..f6996a30e5d
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/dubbo/User.java
@@ -0,0 +1,37 @@
+package com.cnblogs.yjmyzz.demo.service.api.dubbo;
+
+import java.io.Serializable;
+
+/**
+ * Created by yangjunming on 2016/11/2.
+ */
+public class User implements Serializable {
+
+ private int userId;
+
+ private String userName;
+
+ public int getUserId() {
+ return userId;
+ }
+
+ public void setUserId(int userId) {
+ this.userId = userId;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ @Override
+ public String toString() {
+ return "User{" +
+ "userId=" + userId +
+ ", userName='" + userName + '\'' +
+ '}';
+ }
+}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/rest/RestHelloService.java b/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/rest/RestHelloService.java
new file mode 100644
index 00000000000..e179f68a8bf
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/cnblogs/yjmyzz/demo/service/api/rest/RestHelloService.java
@@ -0,0 +1,21 @@
+package com.cnblogs.yjmyzz.demo.service.api.rest;
+
+import com.cnblogs.yjmyzz.demo.service.api.dubbo.User;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+
+/**
+ * Created by yangjunming on 2016/11/2.
+ */
+public interface RestHelloService {
+
+ @GET
+ @Path("/ping")
+ String ping();
+
+ @POST
+ @Path("/reg")
+ String register(User user);
+}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/proto/hello.proto b/dubbo-demo/dubbo-demo-api/src/main/proto/hello.proto
new file mode 100644
index 00000000000..061ff48b34d
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/proto/hello.proto
@@ -0,0 +1,17 @@
+syntax = "proto3";
+
+option java_multiple_files = true;
+option java_package = "com.cnblogs.yjmyzz.demo.service.api.grpc";
+option java_outer_classname = "GrpcHelloServiceProto";
+
+package hello;
+
+service GrpcHelloService {
+ rpc ping (PingRequest) returns (PingResponse) {}
+}
+
+message PingRequest{}
+
+message PingResponse {
+ string message = 1;
+}
diff --git a/dubbo-demo/dubbo-demo-api/src/main/thrift/hello.thrift b/dubbo-demo/dubbo-demo-api/src/main/thrift/hello.thrift
new file mode 100644
index 00000000000..57b66b20735
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/thrift/hello.thrift
@@ -0,0 +1,5 @@
+namespace java com.cnblogs.yjmyzz.demo.service.api.thrift
+
+service ThriftHelloService{
+ string ping()
+}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/assembly/assembly.xml b/dubbo-demo/dubbo-demo-consumer/src/main/assembly/assembly.xml
deleted file mode 100644
index 25235d9064e..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
- assembly
-
- tar.gz
-
- true
-
-
- ${project.build.directory}/dubbo/META-INF/assembly/bin
- bin
- 0755
-
-
- src/main/assembly/conf
- conf
- 0644
-
-
-
-
- lib
-
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties b/dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
deleted file mode 100644
index d3cc21f6af0..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/assembly/conf/dubbo.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-##
-# Copyright 1999-2011 Alibaba Group.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-##
-dubbo.container=log4j,spring
-dubbo.application.name=demo-consumer
-dubbo.application.owner=
-dubbo.registry.address=multicast://224.5.6.7:1234
-#dubbo.registry.address=zookeeper://127.0.0.1:2181
-#dubbo.registry.address=redis://127.0.0.1:6379
-#dubbo.registry.address=dubbo://127.0.0.1:9090
-dubbo.monitor.protocol=registry
-dubbo.log4j.file=logs/dubbo-demo-consumer.log
-dubbo.log4j.level=WARN
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoAction.java b/dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoAction.java
deleted file mode 100644
index b6138e729ad..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoAction.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 1999-2011 Alibaba Group.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.consumer;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.alibaba.dubbo.demo.bid.*;
-import com.alibaba.dubbo.demo.user.User;
-import com.alibaba.dubbo.demo.user.facade.AnotherUserRestService;
-import com.alibaba.dubbo.rpc.RpcContext;
-
-public class DemoAction {
-
- private BidService bidService;
-
- private AnotherUserRestService anotherUserRestService;
-
- public void setBidService(BidService bidService) {
- this.bidService = bidService;
- }
-
- public void setAnotherUserRestService(AnotherUserRestService anotherUserRestService) {
- this.anotherUserRestService = anotherUserRestService;
- }
-
- public void start() throws Exception {
- BidRequest request = new BidRequest();
-
- Impression imp = new Impression();
- imp.setBidFloor(1.1);
- imp.setId("abc");
- List imps = new ArrayList(1);
- imps.add(imp);
- request.setImpressions(imps);
-
- Geo geo = new Geo();
- geo.setCity("beijing");
- geo.setCountry("china");
- geo.setLat(100.1f);
- geo.setLon(100.1f);
-
- Device device = new Device();
- device.setMake("apple");
- device.setOs("ios");
- device.setVersion("7.0");
- device.setLang("zh_CN");
- device.setModel("iphone");
- device.setGeo(geo);
- request.setDevice(device);
-
-// long start = System.currentTimeMillis();
-
-// for (int i = 0; i < 10000; i ++) {
-// System.out.println(bidService.bid(request).getId());
- System.out.println("SUCCESS: got bid response id: " + bidService.bid(request).getId());
-// }
-
-// System.out.println(">>>>> Total time consumed:" + (System.currentTimeMillis() - start));
-
- try {
- bidService.throwNPE();
- System.out.println("ERROR: no exception found");
- } catch (NullPointerException e) {
- System.out.println("SUCCESS: caught exception " + e.getClass());
- }
-
- User user = new User(1L, "larrypage");
- System.out.println("SUCCESS: registered user with id " + anotherUserRestService.registerUser(user).getId());
-
- RpcContext.getContext().setAttachment("clientName", "demo");
- RpcContext.getContext().setAttachment("clientImpl", "dubbox");
- System.out.println("SUCCESS: got user " + anotherUserRestService.getUser(1L));
- }
-
-}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigAction.java b/dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigAction.java
deleted file mode 100644
index 636aba17426..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigAction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright 2006-2014 handu.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.consumer;
-
-import com.alibaba.dubbo.config.annotation.Reference;
-import com.alibaba.dubbo.demo.bid.*;
-import com.alibaba.dubbo.demo.user.User;
-import com.alibaba.dubbo.demo.user.facade.AnotherUserRestService;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.PostConstruct;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Jinkai.Ma
- */
-@Component
-public class DemoJavaConfigAction {
-
- @Reference
- private BidService bidService;
-
- @Reference
- private AnotherUserRestService anotherUserRestService;
-
- @PostConstruct
- public void start() throws Exception {
- BidRequest request = new BidRequest();
-
- Impression imp = new Impression();
- imp.setBidFloor(1.1);
- imp.setId("abc");
- List imps = new ArrayList(1);
- imps.add(imp);
- request.setImpressions(imps);
-
- Geo geo = new Geo();
- geo.setCity("beijing");
- geo.setCountry("china");
- geo.setLat(100.1f);
- geo.setLon(100.1f);
-
- Device device = new Device();
- device.setMake("apple");
- device.setOs("ios");
- device.setVersion("7.0");
- device.setLang("zh_CN");
- device.setModel("iphone");
- device.setGeo(geo);
- request.setDevice(device);
-
-// long start = System.currentTimeMillis();
-
-// for (int i = 0; i < 10000; i ++) {
-// System.out.println(bidService.bid(request).getId());
- System.out.println("SUCESS: got bid response id: " + bidService.bid(request).getId());
-// }
-
-// System.out.println(">>>>> Total time consumed:" + (System.currentTimeMillis() - start));
-
- try {
- bidService.throwNPE();
- System.out.println("ERROR: no exception found");
- } catch (NullPointerException e) {
- System.out.println("SUCCESS: caught exception " + e.getClass());
- }
-
- User user = new User(1L, "larrypage");
- System.out.println("SUCESS: registered user with id " + anotherUserRestService.registerUser(user).getId());
-
- System.out.println("SUCESS: got user " + anotherUserRestService.getUser(1L));
- }
-}
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoActionConfig.java b/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoActionConfig.java
deleted file mode 100644
index ea27c403923..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoActionConfig.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2006-2014 handu.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package dubbo.spring.javaconfig;
-
-import com.alibaba.dubbo.demo.consumer.DemoJavaConfigAction;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author Jinkai.Ma
- */
-@Configuration
-public class DubboDemoActionConfig {
-
- @Bean
- public DemoJavaConfigAction demoAnnotationAction() {
- return new DemoJavaConfigAction();
- }
-
-}
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoConsumerConfig.java b/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoConsumerConfig.java
deleted file mode 100644
index 2052150a92f..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoConsumerConfig.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2006-2014 handu.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package dubbo.spring.javaconfig;
-
-import com.alibaba.dubbo.config.ApplicationConfig;
-import com.alibaba.dubbo.config.RegistryConfig;
-import com.alibaba.dubbo.config.spring.AnnotationBean;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @author Jinkai.Ma
- */
-@Configuration
-public class DubboDemoConsumerConfig {
-
- public static final String APPLICATION_NAME = "consumer-of-helloworld-app";
-
- public static final String REGISTRY_ADDRESS = "zookeeper://127.0.0.1:2181";
-
- public static final String ANNOTATION_PACKAGE = "com.alibaba.dubbo.demo.consumer";
-
- @Bean
- public ApplicationConfig applicationConfig() {
- ApplicationConfig applicationConfig = new ApplicationConfig();
- applicationConfig.setName(APPLICATION_NAME);
- return applicationConfig;
- }
-
- @Bean
- public RegistryConfig registryConfig() {
- RegistryConfig registryConfig = new RegistryConfig();
- registryConfig.setAddress(REGISTRY_ADDRESS);
- return registryConfig;
- }
-
- @Bean
- public AnnotationBean annotationBean() {
- AnnotationBean annotationBean = new AnnotationBean();
- annotationBean.setPackage(ANNOTATION_PACKAGE);
- return annotationBean;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-action.xml b/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-action.xml
deleted file mode 100644
index fb7662ca000..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-action.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml b/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
deleted file mode 100644
index 6dd555c68f9..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/main/resources/META-INF/spring/dubbo-demo-consumer.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoConsumer.java b/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoConsumer.java
deleted file mode 100644
index 3e414ff36c1..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoConsumer.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 1999-2011 Alibaba Group.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.consumer;
-
-public class DemoConsumer {
-
- public static void main(String[] args) {
- com.alibaba.dubbo.container.Main.main(args);
- }
-
-}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigConsumer.java b/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigConsumer.java
deleted file mode 100644
index afbe0704394..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigConsumer.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2006-2014 handu.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.consumer;
-
-/**
- * @author Jinkai.Ma
- */
-public class DemoJavaConfigConsumer {
- public static void main(String[] args) {
- // add `javaconfig` to args
- String[] customArgs = new String[]{"javaconfig"};
- com.alibaba.dubbo.container.Main.main(customArgs);
- }
-}
diff --git a/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/RestClient.java b/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/RestClient.java
deleted file mode 100644
index b8fd5fddba8..00000000000
--- a/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/RestClient.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.consumer;
-
-import com.alibaba.dubbo.demo.user.User;
-
-import javax.ws.rs.client.Client;
-import javax.ws.rs.client.ClientBuilder;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-/**
- * @author lishen
- */
-public class RestClient {
-
- public static void main(String[] args) {
- final String port = "8888";
-// final String port = "8080";
-
-// for (int i = 0; i < 500; i++) {
-// final int index = i + 1;
-// new Thread(new Runnable() {
-// public void run() {
-// System.out.println("Starting thread " + index + "...");
-// for (int j = 0; j < 500; j++) {
- registerUser("http://localhost:" + port + "/services/users/register.json", MediaType.APPLICATION_JSON_TYPE);
-
- registerUser("http://localhost:" + port + "/services/users/register.xml", MediaType.TEXT_XML_TYPE);
-
- getUser("http://localhost:" + port + "/services/users/1.json");
-
- getUser("http://localhost:" + port + "/services/users/2.xml");
-
- registerUser("http://localhost:" + port + "/services/u/register.json", MediaType.APPLICATION_JSON_TYPE);
-
- registerUser("http://localhost:" + port + "/services/u/register.xml", MediaType.TEXT_XML_TYPE);
-
- getUser("http://localhost:" + port + "/services/u/1.json");
-
- getUser("http://localhost:" + port + "/services/u/2.xml");
-
- registerUser("http://localhost:" + port + "/services/customers/register.json", MediaType.APPLICATION_JSON_TYPE);
-
- registerUser("http://localhost:" + port + "/services/customers/register.xml", MediaType.TEXT_XML_TYPE);
-
- getUser("http://localhost:" + port + "/services/customers/1.json");
-
- getUser("http://localhost:" + port + "/services/customers/2.xml");
-// }
-// }
-// }).start();
-// }
- }
-
- private static void registerUser(String url, MediaType mediaType) {
- System.out.println("Registering user via " + url);
- User user = new User(1L, "larrypage");
- Client client = ClientBuilder.newClient();
- WebTarget target = client.target(url);
- Response response = target.request().post(Entity.entity(user, mediaType));
-
- try {
- if (response.getStatus() != 200) {
- throw new RuntimeException("Failed with HTTP error code : " + response.getStatus());
- }
- System.out.println("Successfully got result: " + response.readEntity(String.class));
- } finally {
- response.close();
- client.close();
- }
- }
-
- private static void getUser(String url) {
- System.out.println("Getting user via " + url);
- Client client = ClientBuilder.newClient();
- WebTarget target = client.target(url);
- Response response = target.request().get();
- try {
- if (response.getStatus() != 200) {
- throw new RuntimeException("Failed with HTTP error code : " + response.getStatus());
- }
- System.out.println("Successfully got result: " + response.readEntity(String.class));
- } finally {
- response.close();
- client.close();
- }
- }
-}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/bid/BidServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/bid/BidServiceImpl.java
deleted file mode 100644
index 391ffbc3a81..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/bid/BidServiceImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.bid;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class BidServiceImpl implements BidService {
-
- public BidResponse bid(BidRequest request) {
- BidResponse response = new BidResponse();
-
- response.setId("abc");
-
- SeatBid seatBid = new SeatBid();
- seatBid.setGroup("group");
- seatBid.setSeat("seat");
- List seatBids = new ArrayList(1);
- seatBids.add(seatBid);
-
- response.setSeatBids(seatBids);
-
- return response;
- }
-
- public void throwNPE() throws NullPointerException {
- throw new NullPointerException();
- }
-
-}
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/hello/HelloServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/hello/HelloServiceImpl.java
deleted file mode 100644
index 80fcf24fc56..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/hello/HelloServiceImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.hello;
-
-/**
- * @author lishen
- */
-public class HelloServiceImpl implements HelloService {
-
- public String hello(String name) {
- return "hello " + name;
- }
-}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/UserServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/UserServiceImpl.java
deleted file mode 100644
index e722a01573f..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/UserServiceImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user;
-
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * @author lishen
- */
-public class UserServiceImpl implements UserService {
-
- private final AtomicLong idGen = new AtomicLong();
-
- public User getUser(Long id) {
- return new User(id, "username" + id);
- }
-
-
- public Long registerUser(User user) {
-// System.out.println("Username is " + user.getName());
- return idGen.incrementAndGet();
- }
-}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnnotationDrivenUserRestServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnnotationDrivenUserRestServiceImpl.java
deleted file mode 100644
index e7dd278dacd..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnnotationDrivenUserRestServiceImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user.facade;
-
-import com.alibaba.dubbo.config.annotation.Service;
-import com.alibaba.dubbo.demo.user.User;
-import com.alibaba.dubbo.demo.user.UserService;
-import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-/**
- * @author lishen
- */
-@Service(protocol = {"rest", "dubbo"}, group = "annotationConfig", validation = "true")
-@Path("customers")
-@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
-@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
-public class AnnotationDrivenUserRestServiceImpl implements UserRestService {
-
-// private static final Logger logger = LoggerFactory.getLogger(UserRestServiceImpl.class);
-
- @Autowired
- private UserService userService;
-
- public void setUserService(UserService userService) {
- this.userService = userService;
- }
-
- @GET
- @Path("{id : \\d+}")
- public User getUser(@PathParam("id") Long id/*, @Context HttpServletRequest request*/) {
- // test context injection
-// System.out.println("Client address from @Context injection: " + (request != null ? request.getRemoteAddr() : ""));
-// System.out.println("Client address from RpcContext: " + RpcContext.getContext().getRemoteAddressString());
- return userService.getUser(id);
- }
-
- @POST
- @Path("register")
- public RegistrationResult registerUser(User user) {
- return new RegistrationResult(userService.registerUser(user));
- }
-}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestServiceImpl.java
deleted file mode 100644
index 23a1ba282e2..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestServiceImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user.facade;
-
-import com.alibaba.dubbo.demo.user.User;
-import com.alibaba.dubbo.demo.user.UserService;
-import com.alibaba.dubbo.rpc.RpcContext;
-
-/**
- * @author lishen
- */
-public class AnotherUserRestServiceImpl implements AnotherUserRestService {
-
- private UserService userService;
-
- public void setUserService(UserService userService) {
- this.userService = userService;
- }
-
- public User getUser(Long id) {
- System.out.println("Client name is " + RpcContext.getContext().getAttachment("clientName"));
- System.out.println("Client impl is " + RpcContext.getContext().getAttachment("clientImpl"));
- return userService.getUser(id);
- }
-
- public RegistrationResult registerUser(User user) {
- return new RegistrationResult(userService.registerUser(user));
- }
-}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestServiceImpl.java
deleted file mode 100644
index 659a8203510..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestServiceImpl.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright 1999-2014 dangdang.com.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.user.facade;
-
-import com.alibaba.dubbo.demo.user.User;
-import com.alibaba.dubbo.demo.user.UserService;
-import com.alibaba.dubbo.demo.user.facade.RegistrationResult;
-import com.alibaba.dubbo.demo.user.facade.UserRestService;
-import com.alibaba.dubbo.rpc.RpcContext;
-import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-/**
- * @author lishen
- */
-@Path("users")
-@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
-@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
-public class UserRestServiceImpl implements UserRestService {
-
-// private static final Logger logger = LoggerFactory.getLogger(UserRestServiceImpl.class);
-
- private UserService userService;
-
- public void setUserService(UserService userService) {
- this.userService = userService;
- }
-
- @GET
- @Path("{id : \\d+}")
- public User getUser(@PathParam("id") Long id/*, @Context HttpServletRequest request*/) {
- // test context injection
-// System.out.println("Client address from @Context injection: " + (request != null ? request.getRemoteAddr() : ""));
-// System.out.println("Client address from RpcContext: " + RpcContext.getContext().getRemoteAddressString());
- if (RpcContext.getContext().getRequest(HttpServletRequest.class) != null) {
- System.out.println("Client IP address from RpcContext: " + RpcContext.getContext().getRequest(HttpServletRequest.class).getRemoteAddr());
- }
- if (RpcContext.getContext().getResponse(HttpServletResponse.class) != null) {
- System.out.println("Response object from RpcContext: " + RpcContext.getContext().getResponse(HttpServletResponse.class));
- }
- return userService.getUser(id);
- }
-
- @POST
- @Path("register")
- public RegistrationResult registerUser(User user) {
- return new RegistrationResult(userService.registerUser(user));
- }
-}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java
new file mode 100644
index 00000000000..fa72aeffdb4
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java
@@ -0,0 +1,19 @@
+package com.cnblogs.yjmyzz.demo.service.impl;
+
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Created by yangjunming on 2016/11/3.
+ */
+public class DubboDemoProvider {
+
+ public static void main(String[] args) throws InterruptedException {
+
+ ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext("spring-dubbo-provider.xml");
+ System.out.println("server started ...");
+ while (true) {
+ Thread.sleep(100);
+ }
+ }
+}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/avro/HelloServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/avro/HelloServiceImpl.java
new file mode 100644
index 00000000000..9ebcaa37428
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/avro/HelloServiceImpl.java
@@ -0,0 +1,17 @@
+package com.cnblogs.yjmyzz.demo.service.impl.avro;
+
+import com.cnblogs.yjmyzz.demo.service.api.avro.AvroHelloService;
+import org.apache.avro.AvroRemoteException;
+import org.springframework.stereotype.Service;
+
+/**
+ * Created by yangjunming on 2016/11/3.
+ */
+@Service("avroService")
+public class HelloServiceImpl implements AvroHelloService {
+
+ @Override
+ public CharSequence ping() throws AvroRemoteException {
+ return "avro service is running...";
+ }
+}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/dubbo/HelloServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/dubbo/HelloServiceImpl.java
new file mode 100644
index 00000000000..5906d679467
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/dubbo/HelloServiceImpl.java
@@ -0,0 +1,23 @@
+package com.cnblogs.yjmyzz.demo.service.impl.dubbo;
+
+
+import com.cnblogs.yjmyzz.demo.service.api.dubbo.DubboHelloService;
+import com.cnblogs.yjmyzz.demo.service.api.dubbo.User;
+import org.springframework.stereotype.Service;
+
+/**
+ * Created by yangjunming on 2016/11/3.
+ */
+@Service("dubboService")
+public class HelloServiceImpl implements DubboHelloService {
+
+ @Override
+ public String ping() {
+ return "dubbo service is running...";
+ }
+
+ @Override
+ public String register(User user) {
+ return String.format("%s register ok!", user.getUserName());
+ }
+}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java
new file mode 100644
index 00000000000..59beba49104
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java
@@ -0,0 +1,34 @@
+package com.cnblogs.yjmyzz.demo.service.impl.grpc;
+
+import com.alibaba.dubbo.rpc.protocol.grpc.GrpcBindableService;
+import com.cnblogs.yjmyzz.demo.service.api.grpc.GrpcHelloServiceGrpc;
+import com.cnblogs.yjmyzz.demo.service.api.grpc.PingRequest;
+import com.cnblogs.yjmyzz.demo.service.api.grpc.PingResponse;
+import io.grpc.Channel;
+import io.grpc.stub.StreamObserver;
+import org.springframework.stereotype.Service;
+
+/**
+ * Created by yangjunming on 2016/11/3.
+ */
+@Service("grpcService")
+public class HelloServiceImpl extends GrpcHelloServiceGrpc.GrpcHelloServiceImplBase implements GrpcBindableService {
+
+ private Channel channel;
+
+ public Channel getChannel() {
+ return channel;
+ }
+
+ public void setChannel(Channel channel) {
+ this.channel = channel;
+ }
+
+ @Override
+ public void ping(PingRequest request,
+ StreamObserver responseObserver) {
+// PingResponse reply = PingResponse.newBuilder().setMessage("grpc is running").build();
+// responseObserver.onNext(reply);
+// responseObserver.onCompleted();
+ }
+}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/rest/HelloServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/rest/HelloServiceImpl.java
new file mode 100644
index 00000000000..4356887237c
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/rest/HelloServiceImpl.java
@@ -0,0 +1,27 @@
+package com.cnblogs.yjmyzz.demo.service.impl.rest;
+
+import com.cnblogs.yjmyzz.demo.service.api.dubbo.DubboHelloService;
+import com.cnblogs.yjmyzz.demo.service.api.dubbo.User;
+import com.cnblogs.yjmyzz.demo.service.api.rest.RestHelloService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * Created by yangjunming on 2016/11/3.
+ */
+@Service("restService")
+public class HelloServiceImpl implements RestHelloService {
+
+ @Autowired
+ DubboHelloService dubboHelloService;
+
+ @Override
+ public String ping() {
+ return dubboHelloService.ping();
+ }
+
+ @Override
+ public String register(User user) {
+ return dubboHelloService.register(user);
+ }
+}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/thrift/HelloServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/thrift/HelloServiceImpl.java
new file mode 100644
index 00000000000..b9351c0b52c
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/thrift/HelloServiceImpl.java
@@ -0,0 +1,17 @@
+package com.cnblogs.yjmyzz.demo.service.impl.thrift;
+
+import com.cnblogs.yjmyzz.demo.service.api.thrift.ThriftHelloService;
+import org.apache.thrift.TException;
+import org.springframework.stereotype.Service;
+
+/**
+ * Created by yangjunming on 2016/11/3.
+ */
+@Service("thriftService")
+public class HelloServiceImpl implements ThriftHelloService.Iface {
+
+ @Override
+ public String ping() throws TException {
+ return "thrift service is running...";
+ }
+}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
deleted file mode 100644
index a7232388b5b..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/service-provider.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-context.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-context.xml
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml
new file mode 100644
index 00000000000..bedabbb2626
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml b/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 1b931d7ee00..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
- contextConfigLocation
- /WEB-INF/classes/META-INF/spring/service-provider.xml
-
-
-
-
- com.alibaba.dubbo.remoting.http.servlet.BootstrapListener
-
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- dispatcher
- com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet
- 1
-
-
-
- dispatcher
- /services/*
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/test/java/com/alibaba/dubbo/demo/provider/DemoProvider.java b/dubbo-demo/dubbo-demo-provider/src/test/java/com/alibaba/dubbo/demo/provider/DemoProvider.java
deleted file mode 100644
index b00688c9efc..00000000000
--- a/dubbo-demo/dubbo-demo-provider/src/test/java/com/alibaba/dubbo/demo/provider/DemoProvider.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 1999-2011 Alibaba Group.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.alibaba.dubbo.demo.provider;
-
-import com.alibaba.dubbo.config.ProtocolConfig;
-
-public class DemoProvider {
-
- public static void main(String[] args) {
-// new Thread(new Runnable() {
-// public void run() {
-// try {
-// Thread.sleep(20000);
-// } catch (InterruptedException e) {
-// e.printStackTrace();
-// }
-// ProtocolConfig.destroyAll();
-// }
-// }).start();
- com.alibaba.dubbo.container.Main.main(args);
- }
-
-}
\ No newline at end of file
diff --git a/dubbo-demo/pom.xml b/dubbo-demo/pom.xml
index ffc7e084be8..d0fd168b698 100644
--- a/dubbo-demo/pom.xml
+++ b/dubbo-demo/pom.xml
@@ -1,5 +1,5 @@
- 4.0.0
-
- com.alibaba
- dubbo-parent
- 2.8.5-SNAPSHOT
-
- dubbo-demo
- pom
- ${project.artifactId}
- The demo module of dubbo project
-
- true
-
-
- dubbo-demo-api
- dubbo-demo-provider
- dubbo-demo-consumer
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+
+ com.alibaba
+ dubbo-parent
+ 2.8.5-SNAPSHOT
+
+ dubbo-demo
+ pom
+ ${project.artifactId}
+ The demo module of dubbo project
+
+ true
+
+
+ dubbo-demo-api
+ dubbo-demo-provider
+ dubbo-demo-consumer
+
+
+
+
+
+
+ org.springframework
+ spring-core
+ 4.2.5.RELEASE
+
+
+
+ org.springframework
+ spring-beans
+ 4.2.5.RELEASE
+
+
+
+ org.springframework
+ spring-context
+ 4.2.5.RELEASE
+
+
+
+ org.springframework
+ spring-context-support
+ 4.2.5.RELEASE
+
+
+
+
+ com.alibaba
+ dubbo
+ 2.8.5-SNAPSHOT
+
+
+ log4j
+ log4j
+
+
+
+
+
+
+ org.jboss.resteasy
+ resteasy-client
+ 3.0.9.Final
+
+
+
+ org.jboss.resteasy
+ resteasy-jaxrs
+ 3.0.9.Final
+
+
+
+ org.jboss.resteasy
+ resteasy-netty
+ 3.0.14.Final
+
+
+
+ org.jboss.resteasy
+ resteasy-multipart-provider
+ 3.0.14.Final
+
+
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-core
+ 8.0.11
+
+
+
+ org.apache.tomcat.embed
+ tomcat-embed-logging-juli
+ 8.0.11
+
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.1.0
+
+
+
+ javax.validation
+ validation-api
+ 1.1.0.Final
+
+
+
+
+ org.apache.zookeeper
+ zookeeper
+ 3.4.8
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+ log4j
+ log4j
+
+
+
+
+
+ com.101tec
+ zkclient
+ 0.8.1
+
+
+
+
+ org.jboss.resteasy
+ resteasy-jackson-provider
+ 3.0.14.Final
+
+
+
+ org.jboss.resteasy
+ resteasy-jaxb-provider
+ 3.0.16.Final
+
+
+
+
+ org.apache.thrift
+ libthrift
+ 0.9.3
+
+
+
+
+ io.grpc
+ grpc-netty
+ 1.0.1
+
+
+ io.grpc
+ grpc-protobuf
+ 1.0.1
+
+
+ io.grpc
+ grpc-stub
+ 1.0.1
+
+
+
+ com.google.guava
+ guava
+ 19.0
+
+
+
+
+ org.apache.avro
+ avro
+ 1.8.1
+
+
+ org.apache.avro
+ avro-ipc
+ 1.8.1
+
+
+
diff --git a/dubbo-registry/pom.xml b/dubbo-registry/pom.xml
index c2006e49230..2c87426e5c2 100644
--- a/dubbo-registry/pom.xml
+++ b/dubbo-registry/pom.xml
@@ -31,8 +31,8 @@
dubbo-registry-api
dubbo-registry-default
-
+ dubbo-registry-multicast
dubbo-registry-zookeeper
-
+ dubbo-registry-redis
diff --git a/dubbo-remoting/pom.xml b/dubbo-remoting/pom.xml
index 6e2dd740d56..55d2313c6bc 100644
--- a/dubbo-remoting/pom.xml
+++ b/dubbo-remoting/pom.xml
@@ -30,9 +30,9 @@
dubbo-remoting-api
dubbo-remoting-netty
-
-
-
+ dubbo-remoting-mina
+ dubbo-remoting-grizzly
+ dubbo-remoting-p2p
dubbo-remoting-http
dubbo-remoting-zookeeper
diff --git a/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
index 9cea7c92fbf..86ea7d05694 100644
--- a/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
+++ b/dubbo-rpc/dubbo-rpc-thrift2/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift2/Thrift2Protocol.java
@@ -35,6 +35,27 @@ public Thrift2Protocol() {
super(TException.class, RpcException.class);
}
+
+ @Override
+ protected Runnable doExport(T impl, Class type, URL url)
+ throws RpcException {
+
+ logger.info("impl => " + impl.getClass());
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+
+ return exportNonblockingServer(impl, type, url);
+ //return exportThreadPoolServer(impl, type, url);
+ }
+
+ @Override
+ protected T doRefer(Class type, URL url) throws RpcException {
+ logger.info("type => " + type.getName());
+ logger.info("url => " + url);
+ return doReferFrameAndCompact(type, url);
+ }
+
+
private Runnable exportNonblockingServer(T impl, Class type, URL url)
throws RpcException {
TProcessor tprocessor;
@@ -73,16 +94,16 @@ private Runnable exportNonblockingServer(T impl, Class type, URL url)
new Thread(new Runnable() {
public void run() {
- logger.info("1=>Start Thrift Server");
+ logger.info("Start Thrift NonblockingServer");
thriftServer.serve();
- logger.info("1=>Thrift server started.");
+ logger.info("Thrift NonblockingServer started.");
}
}).start();
return new Runnable() {
public void run() {
try {
- logger.info("1=>Close Thrift Server");
+ logger.info("Close Thrift NonblockingServer");
thriftServer.stop();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
@@ -110,7 +131,7 @@ private Runnable exportThreadPoolServer(T impl, Class type, URL url)
tArgs = new TThreadPoolServer.Args(transport);
tArgs.processor(tprocessor);
tArgs.executorService(Executors.newFixedThreadPool(100));
-// tArgs.protocolFactory(new TBinaryProtocol.Factory());
+ tArgs.protocolFactory(new TBinaryProtocol.Factory());
} catch (Exception e) {
logger.error(e.getMessage(), e);
throw new RpcException("Fail to create thrift server(" + url + ") : " + e.getMessage(), e);
@@ -129,14 +150,14 @@ private Runnable exportThreadPoolServer(T impl, Class type, URL url)
ExecutorService service = Executors.newFixedThreadPool(50);
service.submit(() -> {
- logger.info("3=>Start Thrift Server");
+ logger.info("Start Thrift ThreadPoolServer");
thriftServer.serve();
- logger.info("3=>Thrift server started.");
+ logger.info("Thrift ThreadPoolServer started.");
});
return () -> {
try {
- logger.info("3=>Close Thrift Server");
+ logger.info("Close Thrift ThreadPoolServer");
thriftServer.stop();
} catch (Throwable e) {
logger.warn(e.getMessage(), e);
@@ -145,25 +166,10 @@ private Runnable exportThreadPoolServer(T impl, Class type, URL url)
}
- @Override
- protected Runnable doExport(T impl, Class type, URL url)
- throws RpcException {
-
- logger.info("impl => " + impl.getClass());
- logger.info("type => " + type.getName());
- logger.info("url => " + url);
-
- return exportNonblockingServer(impl, type, url);
- //return exportThreadPoolServer(impl, type, url);
- }
-
- @Override
- protected T doRefer(Class type, URL url) throws RpcException {
-
- logger.info("type => " + type.getName());
- logger.info("url => " + url);
+ private T doReferFrameAndCompact(Class type, URL url) throws RpcException {
try {
+ TSocket tSocket;
TTransport transport;
TProtocol protocol;
T thriftClient = null;
@@ -176,8 +182,9 @@ protected T doRefer(Class type, URL url) throws RpcException {
Class> clazz = Class.forName(clientClsName);
Constructor constructor = clazz.getConstructor(TProtocol.class);
try {
- transport = new TSocket(url.getHost(), url.getPort());
- protocol = new TBinaryProtocol(transport);
+ tSocket = new TSocket(url.getHost(), url.getPort());
+ transport = new TFramedTransport(tSocket);
+ protocol = new TCompactProtocol(transport);
thriftClient = (T) constructor.newInstance(protocol);
transport.open();
logger.info("thrift client opened for service(" + url + ")");
@@ -194,7 +201,7 @@ protected T doRefer(Class type, URL url) throws RpcException {
}
- private T doReferFrameAndCompact(Class type, URL url) throws RpcException {
+ private T doReferBinary(Class type, URL url) throws RpcException {
try {
TTransport transport;
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index 6cbe8c319b4..733de6c4587 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -33,15 +33,15 @@
dubbo-rpc-avro
dubbo-rpc-default
dubbo-rpc-injvm
-
-
+ dubbo-rpc-rmi
+ dubbo-rpc-hessian
dubbo-rpc-http
-
+ dubbo-rpc-webservice
dubbo-rpc-thrift2
dubbo-rpc-grpc
-
-
+ dubbo-rpc-memcached
+ dubbo-rpc-redis
dubbo-rpc-rest
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index 5c9c2f9eca1..98f7ff418d6 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -424,33 +424,33 @@
com.alibaba:dubbo-common
com.alibaba:dubbo-remoting-api
com.alibaba:dubbo-remoting-netty
-
-
-
+ com.alibaba:dubbo-remoting-mina
+ com.alibaba:dubbo-remoting-grizzly
+ com.alibaba:dubbo-remoting-p2p
com.alibaba:dubbo-remoting-http
com.alibaba:dubbo-remoting-zookeeper
com.alibaba:dubbo-rpc-api
com.alibaba:dubbo-rpc-avro
com.alibaba:dubbo-rpc-default
-
+ com.alibaba:dubbo-rpc-injvm
com.alibaba:dubbo-rpc-rmi
-
+ com.alibaba:dubbo-rpc-hessian
com.alibaba:dubbo-rpc-http
-
+ com.alibaba:dubbo-rpc-webservice
com.alibaba:dubbo-rpc-thrift2
com.alibaba:dubbo-rpc-grpc
-
-
+ com.alibaba:dubbo-rpc-memcached
+ com.alibaba:dubbo-rpc-redis
com.alibaba:dubbo-rpc-rest
com.alibaba:dubbo-filter-validation
com.alibaba:dubbo-filter-cache
com.alibaba:dubbo-cluster
com.alibaba:dubbo-registry-api
com.alibaba:dubbo-registry-default
-
+ com.alibaba:dubbo-registry-multicast
com.alibaba:dubbo-registry-zookeeper
-
+ com.alibaba:dubbo-registry-redis
com.alibaba:dubbo-monitor-api
com.alibaba:dubbo-monitor-default
com.alibaba:dubbo-config-api
@@ -458,9 +458,9 @@
com.alibaba:dubbo-container-api
com.alibaba:dubbo-container-spring
com.alibaba:dubbo-container-javaconfig
-
-
-
+ com.alibaba:dubbo-container-jetty
+ com.alibaba:dubbo-container-log4j
+ com.alibaba:dubbo-container-logback
From d8ae6e02f075683b02740a6bad6cf5f6476e5db3 Mon Sep 17 00:00:00 2001
From: yangjunming <1q2w3e4r->
Date: Sun, 25 Dec 2016 21:55:18 +0800
Subject: [PATCH 26/32] =?UTF-8?q?=E5=A2=9E=E5=8A=A0grpc=201.0=E7=9A=84?=
=?UTF-8?q?=E6=94=AF=E6=8C=81=EF=BC=8C=E9=87=8D=E5=86=99dubbo-demo?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97,=E6=8F=90=E4=BE=9B=E4=BA=86rest/dubbo/avro/t?=
=?UTF-8?q?hrift/grpc=E4=BA=94=E7=A7=8D=E5=8D=8F=E8=AE=AE=E7=9A=84?=
=?UTF-8?q?=E5=9F=BA=E6=9C=AC=E7=A4=BA=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/consumer/DubboDemoConsumer.java | 7 +
.../dubbo/com.alibaba.dubbo.rpc.Protocol | 2 +
.../resources => main/resouces}/log4j2.xml | 0
.../src/main/resouces/spring-context.xml | 15 +
.../main/resouces/spring-dubbo-consumer.xml | 0
dubbo-demo/dubbo-demo-provider/pom.xml | 238 +-
.../demo/service/impl/DubboDemoProvider.java | 10 +-
.../service/impl/grpc/HelloServiceImpl.java | 6 +-
.../dubbo/com.alibaba.dubbo.rpc.Protocol | 3 +
.../src/main/resources/spring-context.xml | 15 +
.../main/resources/spring-dubbo-provider.xml | 15 +-
dubbo-maven/pom.xml | 354 --
dubbo-rpc/dubbo-rpc-thrift/pom.xml | 92 -
.../protocol/thrift/ClassNameGenerator.java | 28 -
.../thrift/DubboClassNameGenerator.java | 31 -
.../thrift/ThriftClassNameGenerator.java | 31 -
.../rpc/protocol/thrift/ThriftCodec.java | 719 ---
.../rpc/protocol/thrift/ThriftConstants.java | 15 -
.../rpc/protocol/thrift/ThriftInvoker.java | 153 -
.../protocol/thrift/ThriftNativeCodec.java | 79 -
.../rpc/protocol/thrift/ThriftProtocol.java | 213 -
.../dubbo/rpc/protocol/thrift/ThriftType.java | 34 -
.../rpc/protocol/thrift/ThriftUtils.java | 132 -
.../thrift/ext/MultiServiceProcessor.java | 122 -
.../thrift/io/InputStreamWrapper.java | 75 -
.../io/RandomAccessByteArrayOutputStream.java | 107 -
.../com.alibaba.dubbo.remoting.Codec2 | 1 -
.../internal/com.alibaba.dubbo.rpc.Protocol | 1 -
...bbo.rpc.protocol.thrift.ClassNameGenerator | 2 -
.../test/java/$__ClassNameTestDubboStub.java | 658 ---
.../src/test/java/ClassNameTest.java | 45 -
.../src/test/java/ClassNameTestDubbo.java | 12 -
.../src/test/java/ClassNameTestThrift.java | 748 ---
.../dubbo/rpc/gen/dubbo/$__DemoStub.java | 4376 ---------------
.../com/alibaba/dubbo/rpc/gen/dubbo/Demo.java | 41 -
.../alibaba/dubbo/rpc/gen/thrift/Demo.java | 4805 -----------------
.../rpc/protocol/thrift/AbstractTest.java | 137 -
.../dubbo/rpc/protocol/thrift/DemoImpl.java | 56 -
.../rpc/protocol/thrift/DubboDemoImpl.java | 22 -
.../thrift/FramedTransportFactory.java | 30 -
.../rpc/protocol/thrift/MockedChannel.java | 97 -
.../protocol/thrift/ServerExceptionTest.java | 99 -
.../thrift/ServiceMethodNotFoundTest.java | 151 -
.../rpc/protocol/thrift/ThriftCodecTest.java | 460 --
.../rpc/protocol/thrift/ThriftDemoImpl.java | 22 -
.../protocol/thrift/ThriftProtocolTest.java | 90 -
.../rpc/protocol/thrift/ThriftUtilsTest.java | 88 -
.../thrift/examples/DubboDemoConsumer.java | 24 -
.../thrift/examples/DubboDemoProvider.java | 18 -
.../test/resources/dubbo-demo-consumer.xml | 19 -
.../test/resources/dubbo-demo-provider.xml | 21 -
.../src/test/thrift/ClassNameTestDubbo.thrift | 3 -
.../test/thrift/ClassNameTestThrift.thrift | 3 -
.../src/test/thrift/Demo.thrift | 16 -
dubbo-test/dubbo-test-benchmark-api/pom.xml | 32 -
.../dubbo/rpc/benchmark/BidRequest.java | 57 -
.../dubbo/rpc/benchmark/BidResponse.java | 46 -
.../alibaba/dubbo/rpc/benchmark/Device.java | 81 -
.../dubbo/rpc/benchmark/EchoService.java | 40 -
.../com/alibaba/dubbo/rpc/benchmark/Geo.java | 63 -
.../dubbo/rpc/benchmark/Impression.java | 45 -
.../alibaba/dubbo/rpc/benchmark/SeatBid.java | 46 -
.../benchmark/SerializationOptimizerImpl.java | 41 -
.../com/alibaba/dubbo/rpc/benchmark/Text.java | 43 -
.../dubbo-test-benchmark-client/pom.xml | 202 -
.../src/assembly/assembly.xml | 23 -
.../src/cli/run.bat | 1 -
.../src/cli/run.sh | 1 -
.../benchmark/AbstractBenchmarkClient.java | 251 -
.../rpc/benchmark/AbstractClientRunnable.java | 176 -
.../rpc/benchmark/BidClientRunnable.java | 64 -
.../dubbo/rpc/benchmark/ClientRunnable.java | 20 -
.../rpc/benchmark/RpcBenchmarkClient.java | 24 -
.../dubbo/rpc/benchmark/ServiceFactory.java | 118 -
.../rpc/benchmark/TextClientRunnable.java | 46 -
.../META-INF/cxf/org.apache.cxf.Logger | 1 -
.../src/main/resources/dubbo.properties | 30 -
.../src/main/resources/log4j.xml | 14 -
.../dubbo-test-benchmark-server/pom.xml | 197 -
.../src/assembly/assembly.xml | 23 -
.../src/cli/run.bat | 1 -
.../src/cli/run.sh | 1 -
.../dubbo/rpc/benchmark/EchoServiceImpl.java | 41 -
.../com/alibaba/dubbo/rpc/benchmark/Main.java | 24 -
.../META-INF/cxf/org.apache.cxf.Logger | 1 -
.../META-INF/spring/dubbo-provider.xml | 42 -
.../src/main/resources/log4j.xml | 14 -
.../src/main/webapp/WEB-INF/web.xml | 30 -
dubbo-test/dubbo-test-benchmark/pom.xml | 90 -
.../dubbo-test-benchmark/src/assembly/dev.xml | 24 -
.../src/assembly/release.xml | 24 -
.../benchmark/AbstractBenchmarkClient.java | 247 -
.../benchmark/AbstractBenchmarkServer.java | 52 -
.../rpc/benchmark/AbstractClientRunnable.java | 173 -
.../dubbo/rpc/benchmark/BenchmarkClient.java | 19 -
.../dubbo/rpc/benchmark/BenchmarkServer.java | 11 -
.../dubbo/rpc/benchmark/ClientRunnable.java | 20 -
.../dubbo/rpc/benchmark/DemoService.java | 11 -
.../dubbo/rpc/benchmark/DemoServiceImpl.java | 15 -
.../rpc/benchmark/ExchangeClientFactory.java | 101 -
.../dubbo/rpc/benchmark/RequestObject.java | 37 -
.../dubbo/rpc/benchmark/ResponseObject.java | 29 -
.../rpc/benchmark/RpcBenchmarkClient.java | 24 -
.../rpc/benchmark/RpcBenchmarkServer.java | 18 -
.../dubbo/rpc/benchmark/RpcClient.java | 65 -
.../dubbo/rpc/benchmark/ServiceFactory.java | 91 -
...impleProcessorBenchmarkClientRunnable.java | 184 -
.../src/main/resources/ProviderSample.xml | 37 -
.../src/main/resources/ReadMe.txt | 13 -
.../src/main/resources/dubbo.properties | 14 -
.../src/main/resources/run.bat | 1 -
.../src/main/resources/run.sh | 1 -
.../src/test/backup/BenchmarkRunner.java | 1022 ----
.../src/test/backup/Dubbo.java | 66 -
.../client/DemoBenchmarkClientRunnable.java | 44 -
.../test/resources/dubbo-default.properties | 7 -
.../src/test/resources/log4j.properties | 6 -
.../test/resources/server/dubborpcserver.sh | 1 -
.../src/test/resources/server/dubboserver.sh | 1 -
.../src/test/resources/server/servercommon.sh | 1 -
dubbo-test/dubbo-test-compatibility/pom.xml | 38 -
dubbo-test/dubbo-test-examples/pom.xml | 180 -
.../annotation/AnnotationConsumer.java | 39 -
.../annotation/AnnotationProvider.java | 34 -
.../annotation/action/AnnotationAction.java | 38 -
.../annotation/annotation-consumer.xml | 29 -
.../annotation/annotation-provider.xml | 31 -
.../annotation/api/AnnotationService.java | 27 -
.../impl/AnnotationServiceImpl.java | 34 -
.../examples/aop/AopAnnotationConsumer.java | 36 -
.../examples/aop/AopAnnotationProvider.java | 32 -
.../aop/action/AopAnnotationAction.java | 35 -
.../examples/aop/annotation-consumer.xml | 29 -
.../examples/aop/annotation-provider.xml | 33 -
.../alibaba/dubbo/examples/aop/aop-aspect.xml | 30 -
.../aop/api/AopAnnotationService.java | 25 -
.../examples/aop/aspect/AnnotationAspect.java | 11 -
.../aop/impl/AopAnnotationServiceImpl.java | 32 -
.../dubbo/examples/async/AsyncConsumer.java | 58 -
.../dubbo/examples/async/AsyncProvider.java | 34 -
.../examples/async/api/AsyncService.java | 27 -
.../dubbo/examples/async/async-consumer.xml | 29 -
.../dubbo/examples/async/async-provider.xml | 33 -
.../examples/async/impl/AsyncServiceImpl.java | 32 -
.../dubbo/examples/cache/CacheConsumer.java | 70 -
.../dubbo/examples/cache/CacheProvider.java | 34 -
.../examples/cache/api/CacheService.java | 27 -
.../dubbo/examples/cache/cache-consumer.xml | 29 -
.../dubbo/examples/cache/cache-provider.xml | 33 -
.../examples/cache/impl/CacheServiceImpl.java | 35 -
.../examples/callback/CallbackConsumer.java | 43 -
.../examples/callback/CallbackProvider.java | 34 -
.../callback/api/CallbackListener.java | 27 -
.../callback/api/CallbackService.java | 27 -
.../examples/callback/callback-consumer.xml | 29 -
.../examples/callback/callback-provider.xml | 38 -
.../callback/impl/CallbackServiceImpl.java | 67 -
.../examples/generic/GenericConsumer.java | 40 -
.../examples/generic/GenericProvider.java | 34 -
.../dubbo/examples/generic/api/IService.java | 5 -
.../examples/generic/api/IUserService.java | 62 -
.../examples/generic/generic-consumer.xml | 29 -
.../examples/generic/generic-provider.xml | 34 -
.../generic/impl/UserServiceImpl.java | 29 -
.../heartbeat/HeartBeatExchangeHandler.java | 59 -
.../examples/heartbeat/HeartbeatClient.java | 99 -
.../examples/heartbeat/HeartbeatConsumer.java | 39 -
.../examples/heartbeat/HeartbeatProvider.java | 33 -
.../examples/heartbeat/HeartbeatServer.java | 99 -
.../examples/heartbeat/api/HelloService.java | 26 -
.../examples/heartbeat/heartbeat-consumer.xml | 30 -
.../examples/heartbeat/heartbeat-provider.xml | 34 -
.../heartbeat/impl/HelloServiceImpl.java | 29 -
.../examples/jackson/JacksonConsumer.java | 67 -
.../examples/jackson/JacksonProvider.java | 34 -
.../jackson/api/AbstractInheritBean.java | 33 -
.../dubbo/examples/jackson/api/Inherit.java | 7 -
.../examples/jackson/api/InheritBean.java | 35 -
.../examples/jackson/api/InheritBean2.java | 25 -
.../examples/jackson/api/JacksonBean.java | 110 -
.../jackson/api/JacksonInnerBean.java | 33 -
.../examples/jackson/api/JacksonService.java | 34 -
.../jackson/impl/JacksonServiceImpl.java | 64 -
.../examples/jackson/jackson-consumer.xml | 29 -
.../examples/jackson/jackson-provider.xml | 33 -
.../CustomJacksonObjectMapperProvider.java | 15 -
.../examples/memcached/MemcachedConsumer.java | 50 -
.../examples/memcached/memcached-consumer.xml | 27 -
.../dubbo/examples/merge/MergeConsumer.java | 47 -
.../dubbo/examples/merge/MergeConsumer2.java | 47 -
.../dubbo/examples/merge/MergeProvider.java | 34 -
.../dubbo/examples/merge/MergeProvider2.java | 34 -
.../examples/merge/api/MergeService.java | 29 -
.../examples/merge/impl/MergeServiceImpl.java | 37 -
.../merge/impl/MergeServiceImpl2.java | 37 -
.../merge/impl/MergeServiceImpl3.java | 37 -
.../dubbo/examples/merge/merge-consumer.xml | 29 -
.../dubbo/examples/merge/merge-consumer2.xml | 29 -
.../dubbo/examples/merge/merge-provider.xml | 37 -
.../dubbo/examples/merge/merge-provider2.xml | 33 -
.../dubbo/examples/redis/RedisConsumer.java | 49 -
.../dubbo/examples/redis/redis-consumer.xml | 27 -
.../validation/ValidationConsumer.java | 80 -
.../validation/ValidationProvider.java | 34 -
.../validation/api/ValidationParameter.java | 96 -
.../validation/api/ValidationService.java | 39 -
.../impl/ValidationServiceImpl.java | 37 -
.../validation/validation-consumer.xml | 29 -
.../validation/validation-provider.xml | 33 -
.../examples/version/VersionConsumer.java | 42 -
.../examples/version/VersionProvider.java | 34 -
.../examples/version/VersionProvider2.java | 34 -
.../examples/version/api/VersionService.java | 25 -
.../version/impl/VersionServiceImpl.java | 29 -
.../version/impl/VersionServiceImpl2.java | 29 -
.../examples/version/version-consumer.xml | 29 -
.../examples/version/version-provider.xml | 33 -
.../examples/version/version-provider2.xml | 33 -
...bo.common.json.JacksonObjectMapperProvider | 1 -
.../src/main/resources/log4j.xml | 27 -
.../examples/annotation/AnnotationTest.java | 53 -
.../examples/validation/ValidationTest.java | 137 -
dubbo-test/dubbo-test-integration/pom.xml | 131 -
dubbo-test/pom.xml | 40 -
dubbo-tool/dubbo-demo-lite-archetype/pom.xml | 114 -
.../dubbo-demo-lite-archetype/readme.md | 86 -
.../META-INF/maven/archetype-metadata.xml | 80 -
.../__rootArtifactId__-api/pom.xml | 44 -
.../main/java/SerializationOptimizerImpl.java | 40 -
.../java/extension/ClientTraceFilter.java | 39 -
.../java/extension/CustomExceptionMapper.java | 37 -
.../java/extension/DynamicTraceBinding.java | 33 -
.../extension/DynamicTraceInterceptor.java | 45 -
.../src/main/java/extension/TraceFilter.java | 42 -
.../main/java/extension/TraceInterceptor.java | 45 -
.../src/main/java/user/User.java | 80 -
.../src/main/java/user/UserService.java | 28 -
.../java/user/facade/RegistrationResult.java | 48 -
.../java/user/facade/UserRestService.java | 51 -
.../__rootArtifactId__-consumer/pom.xml | 179 -
.../src/main/assembly/assembly.xml | 42 -
.../src/main/assembly/conf/dubbo.properties | 28 -
.../src/main/java/consumer/DemoAction.java | 52 -
.../spring/dubbo-demo-lite-action.xml | 30 -
.../spring/dubbo-demo-lite-consumer.xml | 24 -
.../src/test/java/consumer/DemoConsumer.java | 27 -
.../src/test/java/consumer/RestClient.java | 92 -
.../src/test/resources/log4j.xml | 31 -
.../__rootArtifactId__-provider/pom.xml | 193 -
.../src/main/java/user/UserServiceImpl.java | 41 -
.../java/user/facade/UserRestServiceImpl.java | 66 -
.../spring/dubbo-demo-lite-provider.xml | 80 -
.../src/main/resources/log4j.xml | 31 -
.../src/main/webapp/WEB-INF/web.xml | 33 -
.../src/test/java/provider/DemoProvider.java | 37 -
.../resources/archetype-resources/pom.xml | 42 -
.../projects/basic/archetype.properties | 5 -
.../dubbo-demo-lite-api/pom.xml | 45 -
.../demolite/SerializationOptimizerImpl.java | 37 -
.../demolite/extension/ClientTraceFilter.java | 36 -
.../extension/CustomExceptionMapper.java | 34 -
.../extension/DynamicTraceBinding.java | 30 -
.../extension/DynamicTraceInterceptor.java | 42 -
.../dubbo/demolite/extension/TraceFilter.java | 39 -
.../demolite/extension/TraceInterceptor.java | 42 -
.../com/alibaba/dubbo/demolite/user/User.java | 77 -
.../dubbo/demolite/user/UserService.java | 25 -
.../user/facade/RegistrationResult.java | 45 -
.../demolite/user/facade/UserRestService.java | 48 -
.../dubbo-demo-lite-consumer/pom.xml | 180 -
.../src/main/assembly/assembly.xml | 39 -
.../src/main/assembly/conf/dubbo.properties | 25 -
.../dubbo/demolite/consumer/DemoAction.java | 50 -
.../spring/dubbo-demo-lite-action.xml | 29 -
.../spring/dubbo-demo-lite-consumer.xml | 21 -
.../dubbo/demolite/consumer/DemoConsumer.java | 24 -
.../dubbo/demolite/consumer/RestClient.java | 89 -
.../src/test/resources/log4j.xml | 28 -
.../dubbo-demo-lite-provider/pom.xml | 195 -
.../dubbo/demolite/user/UserServiceImpl.java | 38 -
.../user/facade/UserRestServiceImpl.java | 63 -
.../spring/dubbo-demo-lite-provider.xml | 75 -
.../src/main/resources/log4j.xml | 28 -
.../src/main/webapp/WEB-INF/web.xml | 30 -
.../dubbo/demolite/provider/DemoProvider.java | 34 -
dubbo-tool/dubbo-demo-lite/pom.xml | 46 -
zkclient/pom.xml | 15 +
287 files changed, 80 insertions(+), 26330 deletions(-)
create mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/java/com/cnblogs/yjmyzz/demo/service/consumer/DubboDemoConsumer.java
create mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/resouces/dubbo/com.alibaba.dubbo.rpc.Protocol
rename dubbo-demo/dubbo-demo-consumer/src/{test/resources => main/resouces}/log4j2.xml (100%)
create mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/resouces/spring-context.xml
create mode 100644 dubbo-demo/dubbo-demo-consumer/src/main/resouces/spring-dubbo-consumer.xml
create mode 100644 dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.Protocol
delete mode 100644 dubbo-maven/pom.xml
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/pom.xml
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ClassNameGenerator.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/DubboClassNameGenerator.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftClassNameGenerator.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftCodec.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftConstants.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftInvoker.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftNativeCodec.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftProtocol.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftType.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftUtils.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ext/MultiServiceProcessor.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/io/InputStreamWrapper.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/io/RandomAccessByteArrayOutputStream.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Codec2
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.protocol.thrift.ClassNameGenerator
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/$__ClassNameTestDubboStub.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTest.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestDubbo.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/ClassNameTestThrift.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/$__DemoStub.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/dubbo/Demo.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/gen/thrift/Demo.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/AbstractTest.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/DemoImpl.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/DubboDemoImpl.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/FramedTransportFactory.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/MockedChannel.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ServerExceptionTest.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ServiceMethodNotFoundTest.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftCodecTest.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftDemoImpl.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftProtocolTest.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftUtilsTest.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/examples/DubboDemoConsumer.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/java/com/alibaba/dubbo/rpc/protocol/thrift/examples/DubboDemoProvider.java
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-consumer.xml
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/resources/dubbo-demo-provider.xml
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/thrift/ClassNameTestDubbo.thrift
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/thrift/ClassNameTestThrift.thrift
delete mode 100644 dubbo-rpc/dubbo-rpc-thrift/src/test/thrift/Demo.thrift
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/pom.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidRequest.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidResponse.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Device.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoService.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Geo.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Impression.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SeatBid.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SerializationOptimizerImpl.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Text.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/pom.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/assembly/assembly.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/cli/run.bat
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/cli/run.sh
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkClient.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/RpcBenchmarkClient.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ServiceFactory.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/TextClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/resources/dubbo.properties
delete mode 100644 dubbo-test/dubbo-test-benchmark-client/src/main/resources/log4j.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/pom.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/assembly/assembly.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/cli/run.bat
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/cli/run.sh
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/Main.java
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/spring/dubbo-provider.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/main/resources/log4j.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark-server/src/main/webapp/WEB-INF/web.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark/pom.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/assembly/dev.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/assembly/release.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkClient.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkServer.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/BenchmarkClient.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/BenchmarkServer.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/ClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/DemoService.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/DemoServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/ExchangeClientFactory.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/RequestObject.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/ResponseObject.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/RpcBenchmarkClient.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/RpcBenchmarkServer.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/RpcClient.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/ServiceFactory.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/java/com/alibaba/dubbo/rpc/benchmark/SimpleProcessorBenchmarkClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/resources/ProviderSample.xml
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/resources/ReadMe.txt
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/resources/dubbo.properties
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/resources/run.bat
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/main/resources/run.sh
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/backup/BenchmarkRunner.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/backup/Dubbo.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/java/com/jingdong/client/DemoBenchmarkClientRunnable.java
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/resources/dubbo-default.properties
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/resources/log4j.properties
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/resources/server/dubborpcserver.sh
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/resources/server/dubboserver.sh
delete mode 100644 dubbo-test/dubbo-test-benchmark/src/test/resources/server/servercommon.sh
delete mode 100644 dubbo-test/dubbo-test-compatibility/pom.xml
delete mode 100644 dubbo-test/dubbo-test-examples/pom.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/annotation/AnnotationConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/annotation/AnnotationProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/annotation/action/AnnotationAction.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/annotation/annotation-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/annotation/annotation-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/annotation/api/AnnotationService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/annotation/impl/AnnotationServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/action/AopAnnotationAction.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aop-aspect.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/api/AopAnnotationService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aspect/AnnotationAspect.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/impl/AopAnnotationServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/async/AsyncConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/async/AsyncProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/async/api/AsyncService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/async/async-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/async/async-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/async/impl/AsyncServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/cache/CacheConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/cache/CacheProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/cache/api/CacheService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/cache/cache-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/cache/cache-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/cache/impl/CacheServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback/CallbackConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback/CallbackProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback/api/CallbackListener.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback/api/CallbackService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback/callback-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback/callback-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/callback/impl/CallbackServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/generic/GenericConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/generic/GenericProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/generic/api/IService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/generic/api/IUserService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/generic/generic-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/generic/generic-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/generic/impl/UserServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/HeartBeatExchangeHandler.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/HeartbeatClient.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/HeartbeatConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/HeartbeatProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/HeartbeatServer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/api/HelloService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/heartbeat-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/heartbeat-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/heartbeat/impl/HelloServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/AbstractInheritBean.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/Inherit.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean2.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonBean.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonInnerBean.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/impl/JacksonServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jacksonprovider/CustomJacksonObjectMapperProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/memcached/MemcachedConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/memcached/memcached-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/MergeConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/MergeConsumer2.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/MergeProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/MergeProvider2.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/api/MergeService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/impl/MergeServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/impl/MergeServiceImpl2.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/impl/MergeServiceImpl3.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/merge-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/merge-consumer2.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/merge-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/merge/merge-provider2.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/redis/RedisConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/redis/redis-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/validation/ValidationConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/validation/ValidationProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/validation/api/ValidationParameter.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/validation/api/ValidationService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/validation/impl/ValidationServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/validation/validation-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/validation/validation-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/VersionConsumer.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/VersionProvider.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/VersionProvider2.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/api/VersionService.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/impl/VersionServiceImpl.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/impl/VersionServiceImpl2.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/version-consumer.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/version-provider.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/version/version-provider2.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.common.json.JacksonObjectMapperProvider
delete mode 100644 dubbo-test/dubbo-test-examples/src/main/resources/log4j.xml
delete mode 100644 dubbo-test/dubbo-test-examples/src/test/java/com/alibaba/dubbo/examples/annotation/AnnotationTest.java
delete mode 100644 dubbo-test/dubbo-test-examples/src/test/java/com/alibaba/dubbo/examples/validation/ValidationTest.java
delete mode 100644 dubbo-test/dubbo-test-integration/pom.xml
delete mode 100644 dubbo-test/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/readme.md
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/SerializationOptimizerImpl.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/ClientTraceFilter.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/CustomExceptionMapper.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceBinding.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceInterceptor.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceFilter.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceInterceptor.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/User.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/UserService.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/RegistrationResult.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/UserRestService.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/assembly.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/conf/dubbo.properties
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/java/consumer/DemoAction.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/DemoConsumer.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/RestClient.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/resources/log4j.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/UserServiceImpl.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/facade/UserRestServiceImpl.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/log4j.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/webapp/WEB-INF/web.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/test/java/provider/DemoProvider.java
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite-archetype/src/test/resources/projects/basic/archetype.properties
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/SerializationOptimizerImpl.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/ClientTraceFilter.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/CustomExceptionMapper.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceBinding.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceInterceptor.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceFilter.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceInterceptor.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/User.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/UserService.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/RegistrationResult.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestService.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/assembly.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/conf/dubbo.properties
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/java/com/alibaba/dubbo/demolite/consumer/DemoAction.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/DemoConsumer.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/RestClient.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/resources/log4j.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/UserServiceImpl.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestServiceImpl.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/log4j.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/webapp/WEB-INF/web.xml
delete mode 100644 dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/test/java/com/alibaba/dubbo/demolite/provider/DemoProvider.java
delete mode 100644 dubbo-tool/dubbo-demo-lite/pom.xml
create mode 100644 zkclient/pom.xml
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/java/com/cnblogs/yjmyzz/demo/service/consumer/DubboDemoConsumer.java b/dubbo-demo/dubbo-demo-consumer/src/main/java/com/cnblogs/yjmyzz/demo/service/consumer/DubboDemoConsumer.java
new file mode 100644
index 00000000000..fca2bdaaae3
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/main/java/com/cnblogs/yjmyzz/demo/service/consumer/DubboDemoConsumer.java
@@ -0,0 +1,7 @@
+package com.cnblogs.yjmyzz.demo.service.consumer;
+
+/**
+ * Created by yangjunming on 2016/12/25.
+ */
+public class DubboDemoConsumer {
+}
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/resouces/dubbo/com.alibaba.dubbo.rpc.Protocol b/dubbo-demo/dubbo-demo-consumer/src/main/resouces/dubbo/com.alibaba.dubbo.rpc.Protocol
new file mode 100644
index 00000000000..ca2cab39014
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/main/resouces/dubbo/com.alibaba.dubbo.rpc.Protocol
@@ -0,0 +1,2 @@
+grpc=com.alibaba.dubbo.rpc.protocol.grpc.GrpcProtocol
+thrift2=com.alibaba.dubbo.rpc.protocol.thrift2.Thrift2Protocol
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j2.xml b/dubbo-demo/dubbo-demo-consumer/src/main/resouces/log4j2.xml
similarity index 100%
rename from dubbo-demo/dubbo-demo-consumer/src/test/resources/log4j2.xml
rename to dubbo-demo/dubbo-demo-consumer/src/main/resouces/log4j2.xml
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/resouces/spring-context.xml b/dubbo-demo/dubbo-demo-consumer/src/main/resouces/spring-context.xml
new file mode 100644
index 00000000000..e59a14c1c71
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/main/resouces/spring-context.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-consumer/src/main/resouces/spring-dubbo-consumer.xml b/dubbo-demo/dubbo-demo-consumer/src/main/resouces/spring-dubbo-consumer.xml
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/dubbo-demo/dubbo-demo-provider/pom.xml b/dubbo-demo/dubbo-demo-provider/pom.xml
index 8859cbc9ca8..ce10b482e82 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -1,18 +1,3 @@
-
4.0.0
@@ -22,7 +7,7 @@
2.8.5-SNAPSHOT
dubbo-demo-provider
- war
+ jar
${project.artifactId}
The demo provider module of dubbo project
@@ -34,226 +19,5 @@
dubbo-demo-api
${project.parent.version}
-
- com.alibaba
- dubbo
- ${project.parent.version}
-
-
- org.javassist
- javassist
-
-
- io.netty
- netty
-
-
- org.apache.mina
- mina-core
-
-
- org.glassfish.grizzly
- grizzly-core
-
-
- org.apache.httpcomponents
- httpclient
-
-
- com.alibaba
- fastjson
-
-
- com.thoughtworks.xstream
- xstream
-
-
- org.apache.bsf
- bsf-api
-
-
- org.apache.zookeeper
- zookeeper
-
-
- log4j
- log4j
-
-
- org.slf4j
- slf4j-log4j12
-
-
-
-
-
-
- com.101tec
- zkclient
-
-
- org.apache.curator
- curator-framework
-
-
- com.googlecode.xmemcached
- xmemcached
-
-
- org.apache.cxf
- cxf-rt-frontend-simple
-
-
- org.apache.cxf
- cxf-rt-transports-http
-
-
- org.apache.thrift
- libthrift
-
-
- com.caucho
- hessian
-
-
- javax.servlet
- javax.servlet-api
-
-
- org.mortbay.jetty
- jetty
-
-
- org.mortbay.jetty
- servlet-api
-
-
-
-
-
-
-
-
-
-
-
-
- redis.clients
- jedis
-
-
- javax.validation
- validation-api
-
-
- org.hibernate
- hibernate-validator
-
-
- javax.el
- javax.el-api
-
-
- org.glassfish.web
- javax.el
-
-
- javax.cache
- cache-api
-
-
-
- org.jboss.resteasy
- resteasy-jaxrs
-
-
-
- org.jboss.resteasy
- resteasy-client
-
-
-
- org.jboss.resteasy
- resteasy-netty
-
-
-
- org.jboss.resteasy
- resteasy-jdk-http
-
-
-
- org.jboss.resteasy
- resteasy-jackson-provider
-
-
-
- org.jboss.resteasy
- resteasy-jaxb-provider
-
-
-
- org.apache.tomcat.embed
- tomcat-embed-core
-
-
- org.apache.tomcat.embed
- tomcat-embed-logging-juli
-
-
-
- com.esotericsoftware.kryo
- kryo
-
-
- de.javakaffee
- kryo-serializers
-
-
- de.ruedigermoeller
- fst
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java
index fa72aeffdb4..65e38969561 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/DubboDemoProvider.java
@@ -1,5 +1,7 @@
package com.cnblogs.yjmyzz.demo.service.impl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -8,10 +10,14 @@
*/
public class DubboDemoProvider {
+ private static Logger logger = LoggerFactory.getLogger(DubboDemoProvider.class);
+
public static void main(String[] args) throws InterruptedException {
- ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext("spring-dubbo-provider.xml");
- System.out.println("server started ...");
+ ConfigurableApplicationContext ctx = new ClassPathXmlApplicationContext("spring-context.xml");
+
+ logger.info("server started ...");
+
while (true) {
Thread.sleep(100);
}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java
index 59beba49104..eb45084c55d 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/cnblogs/yjmyzz/demo/service/impl/grpc/HelloServiceImpl.java
@@ -27,8 +27,8 @@ public void setChannel(Channel channel) {
@Override
public void ping(PingRequest request,
StreamObserver responseObserver) {
-// PingResponse reply = PingResponse.newBuilder().setMessage("grpc is running").build();
-// responseObserver.onNext(reply);
-// responseObserver.onCompleted();
+ PingResponse reply = PingResponse.newBuilder().setMessage("grpc is running").build();
+ responseObserver.onNext(reply);
+ responseObserver.onCompleted();
}
}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.Protocol b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.Protocol
new file mode 100644
index 00000000000..ea30049702a
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.rpc.Protocol
@@ -0,0 +1,3 @@
+grpc=com.alibaba.dubbo.rpc.protocol.grpc.GrpcProtocol
+thrift2=com.alibaba.dubbo.rpc.protocol.thrift2.Thrift2Protocol
+avro=com.alibaba.dubbo.rpc.protocol.avro.AvroProtocol
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-context.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-context.xml
index e69de29bb2d..e59a14c1c71 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-context.xml
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-context.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml
index bedabbb2626..4decb31aa9b 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/spring-dubbo-provider.xml
@@ -16,20 +16,27 @@
accepts="500"
contextpath="service"/>
+
+
-
+
+
+
-
-
-
+
+
+
\ No newline at end of file
diff --git a/dubbo-maven/pom.xml b/dubbo-maven/pom.xml
deleted file mode 100644
index 68893fdf6c6..00000000000
--- a/dubbo-maven/pom.xml
+++ /dev/null
@@ -1,354 +0,0 @@
-
-
- 4.0.0
-
- org.sonatype.oss
- oss-parent
- 7
-
- com.alibaba
- dubbo
- 2.4.3
- jar
- Dubbo
- Dubbo is a distributed service framework enpowers applications with service import/export capability with high performance RPC.
- http://code.alibabatech.com/wiki/display/dubbo
- 2012
-
-
- Apache 2
- http://www.apache.org/licenses/LICENSE-2.0.txt
- repo
- A business-friendly OSS license
-
-
-
- Alibaba
- http://www.alibaba.com
-
-
-
- org.springframework
- spring
- 2.5.6.SEC03
-
-
- org.javassist
- javassist
- 3.15.0-GA
-
-
- io.netty
- netty
- 3.2.5.Final
-
-
- org.apache.mina
- mina-core
- 1.1.7
- provided
-
-
- org.glassfish.grizzly
- grizzly-core
- 2.1.4
- provided
-
-
- org.apache.httpcomponents
- httpclient
- 4.1.2
- provided
-
-
- com.alibaba
- fastjson
- 1.1.18
- provided
-
-
- com.thoughtworks.xstream
- xstream
- 1.4.1
- provided
-
-
- org.apache.bsf
- bsf-api
- 3.1
- provided
-
-
- org.apache.zookeeper
- zookeeper
- 3.3.3
- provided
-
-
- com.github.sgroschupf
- zkclient
- 0.1
- provided
-
-
- com.netflix.curator
- curator-framework
- 1.1.10
- provided
-
-
- com.googlecode.xmemcached
- xmemcached
- 1.3.6
- provided
-
-
- org.apache.cxf
- cxf-rt-frontend-simple
- 2.6.1
- provided
-
-
- org.apache.cxf
- cxf-rt-transports-http
- 2.6.1
- provided
-
-
- org.apache.thrift
- libthrift
- 0.8.0
- provided
-
-
- com.caucho
- hessian
- 4.0.7
- provided
-
-
- javax.servlet
- javax.servlet-api
- 2.5
- provided
-
-
- org.mortbay.jetty
- jetty
- 6.1.26
- provided
-
-
- log4j
- log4j
- 1.2.16
- provided
-
-
- org.slf4j
- slf4j-api
- 1.6.2
- provided
-
-
- redis.clients
- jedis
- 2.0.0
- provided
-
-
- javax.validation
- validation-api
- 1.0.0.GA
- provided
-
-
- org.hibernate
- hibernate-validator
- 4.2.0.Final
- provided
-
-
- javax.cache
- cache-api
- 0.4
- provided
-
-
- ch.qos.logback
- logback-classic
- 1.0.6
- provided
-
-
-
-
-
- maven-source-plugin
-
-
- attach-sources
-
- jar
-
-
-
-
-
- maven-compiler-plugin
-
-
- 1.5
- UTF-8
-
-
-
- maven-jar-plugin
-
-
- true
- true
-
- true
- true
-
-
-
-
-
- maven-javadoc-plugin
-
-
- attach-javadoc
-
- jar
-
-
-
-
- public
- UTF-8
- UTF-8
- UTF-8
- com.alibaba.com.*
-
- http://docs.oracle.com/javase/6/docs/api
-
-
-
-
- maven-gpg-plugin
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
-
-
-
-
- true
-
-
- jira
- http://code.alibabatech.com/jira/browse/DUBBO
-
-
- http://code.alibabatech.com/svn/dubbo/trunk
- scm:svn:http://code.alibabatech.com/svn/dubbo/trunk
- scm:svn:http://code.alibabatech.com/svn/dubbo/trunk
-
-
-
- Dubbo User Mailling List
- dubbo-subscribe AT googlegroups DOT com
- dubbo-unsubscribe AT googlegroups DOT com
- dubbo AT googlegroups DOT com
- http://groups.google.com/group/dubbo
-
-
-
-
- QianXiao(Shawn)
- shawn.qianx
- shawn.qianx (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiangFei(William)
- william.liangf
- william.liangf (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiDing(Jerry)
- ding.lid
- ding.lid (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiuChao(Charles)
- chao.liuc
- chao.liuc (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LiuHaoMin(Ludvik)
- haoming.liuhm
- haoming.liuhm (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- ChenLei(Tony)
- tony.chenl
- tony.chenl (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
- LuGang(Kimi)
- gang.lvgm
- gang.lvgm (AT) alibaba-inc.com
-
- Developer
-
- +8
-
-
-
diff --git a/dubbo-rpc/dubbo-rpc-thrift/pom.xml b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
deleted file mode 100644
index 63456af966e..00000000000
--- a/dubbo-rpc/dubbo-rpc-thrift/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
- 4.0.0
-
- com.alibaba
- dubbo-rpc
- 2.8.5-SNAPSHOT
-
- dubbo-rpc-thrift
- jar
- ${project.artifactId}
- The thrift rpc module of dubbo project
-
- true
-
-
-
- com.alibaba
- dubbo-rpc-api
- ${project.parent.version}
-
-
- com.alibaba
- dubbo-rpc-default
- ${project.parent.version}
-
-
- com.alibaba
- dubbo-remoting-api
- ${project.parent.version}
-
-
- com.alibaba
- dubbo-remoting-netty
- ${project.parent.version}
-
-
- org.apache.thrift
- libthrift
-
-
- org.apache.httpcomponents
- httpcore
-
-
-
-
-
- org.slf4j
- slf4j-api
- ${slf4j_version}
-
-
-
- org.apache.httpcomponents
- httpclient
-
-
-
- commons-lang
- commons-lang
-
-
-
- com.alibaba
- dubbo-config-spring
- ${project.parent.version}
- test
-
-
- com.alibaba
- dubbo-registry-multicast
- ${project.parent.version}
- test
-
-
-
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ClassNameGenerator.java b/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ClassNameGenerator.java
deleted file mode 100644
index 36e5eda2821..00000000000
--- a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ClassNameGenerator.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * File Created at 2012-02-02
- * $Id$
- *
- * Copyright 2008 Alibaba.com Croporation Limited.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information of
- * Alibaba Company. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Alibaba.com.
- */
-package com.alibaba.dubbo.rpc.protocol.thrift;
-
-import com.alibaba.dubbo.common.extension.SPI;
-
-/**
- * @author kimi
- */
-@SPI( DubboClassNameGenerator.NAME )
-public interface ClassNameGenerator {
-
- public String generateArgsClassName( String serviceName, String methodName );
-
- public String generateResultClassName( String serviceName, String methodName );
-
-}
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/DubboClassNameGenerator.java b/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/DubboClassNameGenerator.java
deleted file mode 100644
index ab9d70832bc..00000000000
--- a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/DubboClassNameGenerator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * File Created at 2012-02-02
- * $Id$
- *
- * Copyright 2008 Alibaba.com Croporation Limited.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information of
- * Alibaba Company. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Alibaba.com.
- */
-package com.alibaba.dubbo.rpc.protocol.thrift;
-
-/**
- * @author kimi
- */
-public class DubboClassNameGenerator implements ClassNameGenerator {
-
- public static final String NAME = "dubbo";
-
- public String generateArgsClassName( String serviceName, String methodName ) {
- return ThriftUtils.generateMethodArgsClassName( serviceName, methodName );
- }
-
- public String generateResultClassName( String serviceName, String methodName ) {
- return ThriftUtils.generateMethodResultClassName( serviceName, methodName );
- }
-
-}
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftClassNameGenerator.java b/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftClassNameGenerator.java
deleted file mode 100644
index 5c34c222f25..00000000000
--- a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftClassNameGenerator.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * File Created at 2012-02-02
- * $Id$
- *
- * Copyright 2008 Alibaba.com Croporation Limited.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information of
- * Alibaba Company. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Alibaba.com.
- */
-package com.alibaba.dubbo.rpc.protocol.thrift;
-
-/**
- * @author kimi
- */
-public class ThriftClassNameGenerator implements ClassNameGenerator {
-
- public static final String NAME = "thrift";
-
- public String generateArgsClassName( String serviceName, String methodName ) {
- return ThriftUtils.generateMethodArgsClassNameThrift( serviceName, methodName );
- }
-
- public String generateResultClassName( String serviceName, String methodName ) {
- return ThriftUtils.generateMethodResultClassNameThrift( serviceName, methodName );
- }
-
-}
diff --git a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftCodec.java b/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftCodec.java
deleted file mode 100644
index 6c4dee9837f..00000000000
--- a/dubbo-rpc/dubbo-rpc-thrift/src/main/java/com/alibaba/dubbo/rpc/protocol/thrift/ThriftCodec.java
+++ /dev/null
@@ -1,719 +0,0 @@
-/**
- * File Created at 2011-12-05
- * $Id$
- *
- * Copyright 2008 Alibaba.com Croporation Limited.
- * All rights reserved.
- *
- * This software is the confidential and proprietary information of
- * Alibaba Company. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Alibaba.com.
- */
-package com.alibaba.dubbo.rpc.protocol.thrift;
-
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.thrift.TApplicationException;
-import org.apache.thrift.TBase;
-import org.apache.thrift.TException;
-import org.apache.thrift.TFieldIdEnum;
-import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TMessage;
-import org.apache.thrift.protocol.TMessageType;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TFramedTransport;
-import org.apache.thrift.transport.TIOStreamTransport;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.extension.ExtensionLoader;
-import com.alibaba.dubbo.common.utils.ClassHelper;
-import com.alibaba.dubbo.remoting.Channel;
-import com.alibaba.dubbo.remoting.Codec2;
-import com.alibaba.dubbo.remoting.buffer.ChannelBuffer;
-import com.alibaba.dubbo.remoting.buffer.ChannelBufferInputStream;
-import com.alibaba.dubbo.remoting.exchange.Request;
-import com.alibaba.dubbo.remoting.exchange.Response;
-import com.alibaba.dubbo.rpc.RpcException;
-import com.alibaba.dubbo.rpc.RpcInvocation;
-import com.alibaba.dubbo.rpc.RpcResult;
-import com.alibaba.dubbo.rpc.protocol.thrift.io.RandomAccessByteArrayOutputStream;
-
-/**
- * Thrift framed protocol codec.
- *
- *
- * |<- message header ->|<- message body ->|
- * +----------------+----------------------+------------------+---------------------------+------------------+
- * | magic (2 bytes)|message size (4 bytes)|head size(2 bytes)| version (1 byte) | header | message body |
- * +----------------+----------------------+------------------+---------------------------+------------------+
- * |<- message size ->|
- *
- *
- *
- * header fields in version 1
- *
- * - string - service name
- * - long - dubbo request id
- *
- *
- *
- * @author gang.lvg
- */
-public class ThriftCodec implements Codec2 {
-
- private static final AtomicInteger THRIFT_SEQ_ID = new AtomicInteger( 0 );
-
- private static final ConcurrentMap> cachedClass =
- new ConcurrentHashMap>();
-
- static final ConcurrentMap cachedRequest =
- new ConcurrentHashMap();
-
- public static final int MESSAGE_LENGTH_INDEX = 2;
-
- public static final int MESSAGE_HEADER_LENGTH_INDEX = 6;
-
- public static final int MESSAGE_SHORTEST_LENGTH = 10;
-
- public static final String NAME = "thrift";
-
- public static final String PARAMETER_CLASS_NAME_GENERATOR = "class.name.generator";
-
- public static final byte VERSION = (byte)1;
-
- public static final short MAGIC = (short) 0xdabc;
-
- public void encode( Channel channel, ChannelBuffer buffer, Object message )
- throws IOException {
-
- if ( message instanceof Request ) {
- encodeRequest( channel, buffer, ( Request ) message );
- }
- else if ( message instanceof Response ) {
- encodeResponse( channel, buffer, ( Response ) message );
- } else {
- throw new UnsupportedOperationException(
- new StringBuilder( 32 )
- .append( "Thrift codec only support encode " )
- .append( Request.class.getName() )
- .append( " and " )
- .append( Response.class.getName() )
- .toString() );
- }
-
- }
-
- public Object decode( Channel channel, ChannelBuffer buffer ) throws IOException {
-
- int available = buffer.readableBytes();
-
- if ( available < MESSAGE_SHORTEST_LENGTH ) {
-
- return DecodeResult.NEED_MORE_INPUT;
-
- } else {
-
- TIOStreamTransport transport = new TIOStreamTransport( new ChannelBufferInputStream(buffer));
-
- TBinaryProtocol protocol = new TBinaryProtocol( transport );
-
- short magic;
- int messageLength;
-
- try{
-// protocol.readI32(); // skip the first message length
- byte[] bytes = new byte[4];
- transport.read( bytes, 0, 4 );
- magic = protocol.readI16();
- messageLength = protocol.readI32();
-
- } catch ( TException e ) {
- throw new IOException( e.getMessage(), e );
- }
-
- if ( MAGIC != magic ) {
- throw new IOException(
- new StringBuilder( 32 )
- .append( "Unknown magic code " )
- .append( magic )
- .toString() );
- }
-
- if ( available < messageLength ) { return DecodeResult.NEED_MORE_INPUT; }
-
- return decode( protocol );
-
- }
-
- }
-
- private Object decode( TProtocol protocol )
- throws IOException {
-
- // version
- String serviceName;
- long id;
-
- TMessage message;
-
- try {
- protocol.readI16();
- protocol.readByte();
- serviceName = protocol.readString();
- id = protocol.readI64();
- message = protocol.readMessageBegin();
- } catch ( TException e ) {
- throw new IOException( e.getMessage(), e );
- }
-
- if ( message.type == TMessageType.CALL ) {
-
- RpcInvocation result = new RpcInvocation();
- result.setAttachment(Constants.INTERFACE_KEY, serviceName );
- result.setMethodName( message.name );
-
- String argsClassName = ExtensionLoader.getExtensionLoader(ClassNameGenerator.class)
- .getExtension(ThriftClassNameGenerator.NAME).generateArgsClassName( serviceName, message.name );
-
- if ( StringUtils.isEmpty( argsClassName ) ) {
- throw new RpcException( RpcException.SERIALIZATION_EXCEPTION,
- "The specified interface name incorrect." );
- }
-
- Class clazz = cachedClass.get( argsClassName );
-
- if ( clazz == null ) {
- try {
-
- clazz = ClassHelper.forNameWithThreadContextClassLoader( argsClassName );
-
- cachedClass.putIfAbsent( argsClassName, clazz );
-
- } catch ( ClassNotFoundException e ) {
- throw new RpcException( RpcException.SERIALIZATION_EXCEPTION, e.getMessage(), e );
- }
- }
-
- TBase args;
-
- try {
- args = ( TBase ) clazz.newInstance();
- } catch ( InstantiationException e ) {
- throw new RpcException( RpcException.SERIALIZATION_EXCEPTION, e.getMessage(), e );
- } catch ( IllegalAccessException e ) {
- throw new RpcException( RpcException.SERIALIZATION_EXCEPTION, e.getMessage(), e );
- }
-
- try{
- args.read( protocol );
- protocol.readMessageEnd();
- } catch ( TException e ) {
- throw new RpcException( RpcException.SERIALIZATION_EXCEPTION, e.getMessage(), e );
- }
-
- List