You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/06/04 15:45:52 UTC

[GitHub] lovepoem closed pull request #1881: Pull latest code

lovepoem closed pull request #1881: Pull latest code
URL: https://github.com/apache/incubator-dubbo/pull/1881
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.gitignore b/.gitignore
index 59f507d158..af3d4f9128 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,9 @@ target/
 *.diff
 *.patch
 *.tmp
+*.java~
+*.properties~
+*.xml~
 
 # system ignore
 .DS_Store
diff --git a/README b/README
deleted file mode 100644
index 2f9152b04d..0000000000
--- a/README
+++ /dev/null
@@ -1,200 +0,0 @@
-由于开源站点因为安全问题被下掉,如果编译时出现找不到opensesame依赖情况的,请先手动下载https://github.com/alibaba/opensesame
-本地install,这几天我们会把opensesame发到mavan中央仓库。
-
-临时文档地址:http://alibaba.github.io/dubbo-doc-static/Developer+Guide-zh.htm
-
-================================================================
-
-Dubbo is a distributed service framework enpowers applications with service import/export capability with high performance RPC.
-
-It's composed of three kernel parts:
-
-Remoting: a network communication framework provides sync-over-async and request-response messaging.
-
-Clustering: a remote procedure call abstraction with load-balancing/failover/clustering capabilities.
-
-Registry: a service directory framework for service registration and service event publish/subscription
-
-For more, please refer to:
-
-    http://code.alibabatech.com/wiki/display/dubbo
-
-================================================================
-Quick Start
-================================================================
-
-Export remote service:
-
-    <bean id="barService" class="com.foo.BarServiceImpl" />
-	
-    <dubbo:service interface="com.foo.BarService" ref="barService" />
-
-Refer remote service:
-
-    <dubbo:reference id="barService" interface="com.foo.BarService" />
-	
-    <bean id="barAction" class="com.foo.BarAction">
-        <property name="barService" ref="barService" />
-    </bean>
-
-================================================================
-Source Building
-================================================================
-
-0. Install the git and maven command line:
-
-    yum install git
-    or: apt-get install git
-
-    cd ~
-    wget http://www.apache.org/dist//maven/binaries/apache-maven-2.2.1-bin.tar.gz
-    tar zxvf apache-maven-2.2.1-bin.tar.gz
-    vi .bash_profile
-       - edit: export PATH=$PATH:~/apache-maven-2.2.1/bin
-    source .bash_profile
-
-1. Checkout the dubbo source code:
-
-    cd ~
-    git clone https://github.com/alibaba/dubbo.git dubbo
-
-    git checkout -b dubbo-2.4.0
-    git checkout master
-
-2. Import the dubbo source code to eclipse project:
-
-    cd ~/dubbo
-    mvn eclipse:eclipse
-    Eclipse -> Menu -> File -> Import -> Exsiting Projects to Workspace -> Browse -> Finish
-
-    Context Menu -> Run As -> Java Application:
-    dubbo-demo-provider/src/test/java/com.alibaba.dubbo.demo.provider.DemoProvider
-    dubbo-demo-consumer/src/test/java/com.alibaba.dubbo.demo.consumer.DemoConsumer
-    dubbo-monitor-simple/src/test/java/com.alibaba.dubbo.monitor.simple.SimpleMonitor
-    dubbo-registry-simple/src/test/java/com.alibaba.dubbo.registry.simple.SimpleRegistry
-
-    Edit Config:
-    dubbo-demo-provider/src/test/resources/dubbo.properties
-    dubbo-demo-consumer/src/test/resources/dubbo.properties
-    dubbo-monitor-simple/src/test/resources/dubbo.properties
-    dubbo-registry-simple/src/test/resources/dubbo.properties
-
-3. Build the dubbo binary package:
-
-    cd ~/dubbo
-    mvn clean install -Dmaven.test.skip
-    cd dubbo/target
-    ls
-
-4. Install the demo provider:
-
-    cd ~/dubbo/dubbo-demo-provider/target
-    tar zxvf dubbo-demo-provider-2.4.0-assembly.tar.gz
-    cd dubbo-demo-provider-2.4.0/bin
-    ./start.sh
-
-5. Install the demo consumer:
-
-    cd ~/dubbo/dubbo-demo-consumer/target
-    tar zxvf dubbo-demo-consumer-2.4.0-assembly.tar.gz
-    cd dubbo-demo-consumer-2.4.0/bin
-    ./start.sh
-    cd ../logs
-    tail -f stdout.log
-
-6. Install the simple monitor:
-
-    cd ~/dubbo/dubbo-simple-monitor/target
-    tar zxvf dubbo-simple-monitor-2.4.0-assembly.tar.gz
-    cd dubbo-simple-monitor-2.4.0/bin
-    ./start.sh
-    http://127.0.0.1:8080
-
-7. Install the simple registry:
-
-    cd ~/dubbo/dubbo-simple-registry/target
-    tar zxvf dubbo-simple-registry-2.4.0-assembly.tar.gz
-    cd dubbo-simple-registry-2.4.0/bin
-    ./start.sh
-
-    cd ~/dubbo/dubbo-demo-provider/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=dubbo://127.0.0.1:9090
-    cd ../bin
-    ./restart.sh
-
-    cd ~/dubbo/dubbo-demo-consumer/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=dubbo://127.0.0.1:9090
-    cd ../bin
-    ./restart.sh
-
-    cd ~/dubbo/dubbo-simple-monitor/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=dubbo://127.0.0.1:9090
-    cd ../bin
-    ./restart.sh
-
-8. Install the zookeeper registry:
-
-    cd ~
-    wget http://www.apache.org/dist//zookeeper/zookeeper-3.3.3/zookeeper-3.3.3.tar.gz
-    tar zxvf zookeeper-3.3.3.tar.gz
-    cd zookeeper-3.3.3/conf
-    cp zoo_sample.cfg zoo.cfg
-    vi zoo.cfg
-       - edit: dataDir=/home/xxx/data
-    cd ../bin
-    ./zkServer.sh start
-
-    cd ~/dubbo/dubbo-demo-provider/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181
-    cd ../bin
-    ./restart.sh
-
-    cd ~/dubbo/dubbo-demo-consumer/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181
-    cd ../bin
-    ./restart.sh
-
-    cd ~/dubbo/dubbo-simple-monitor/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=zookeeper://127.0.0.1:2181
-    cd ../bin
-    ./restart.sh
-
-9. Install the redis registry:
-
-    cd ~
-    wget http://redis.googlecode.com/files/redis-2.4.8.tar.gz
-    tar xzf redis-2.4.8.tar.gz
-    cd redis-2.4.8
-    make
-    nohup ./src/redis-server redis.conf &
-
-    cd ~/dubbo/dubbo-demo-provider/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=redis://127.0.0.1:6379
-    cd ../bin
-    ./restart.sh
-
-    cd ~/dubbo/dubbo-demo-consumer/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=redis://127.0.0.1:6379
-    cd ../bin
-    ./restart.sh
-
-    cd ~/dubbo/dubbo-simple-monitor/conf
-    vi dubbo.properties
-       - edit: dubbo.registry.adddress=redis://127.0.0.1:6379
-    cd ../bin
-    ./restart.sh
-
-10. Install the admin console:
-
-    cd ~/dubbo/dubbo-admin
-    mvn jetty:run -Ddubbo.registry.address=zookeeper://127.0.0.1:2181
-    http://root:root@127.0.0.1:8080
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..8be6642a82
--- /dev/null
+++ b/README.md
@@ -0,0 +1,202 @@
+Dubbox now means Dubbo eXtensions. If you know java, javax and dubbo, you know what dubbox is :)
+
+Dubbox adds features like RESTful remoting, Kyro/FST serialization, etc to the popular [dubbo service framework](http://github.com/alibaba/dubbo). It's been used by several projects of [dangdang.com](http://www.dangdang.com), which is one of the major e-commerce companies in China.
+
+## 主要贡献者
+
+* 沈理 [当当网](http://www.dangdang.com/) shenli@dangdang.com
+* 王宇轩 [当当网](http://www.dangdang.com/) wangyuxuan@dangdang.com
+* 马金凯 [韩都衣舍](http://www.handu.com/) majinkai@handu.com
+* Dylan 独立开发者 dinguangx@163.com
+* Kangfoo 独立开发者
+
+**讨论QQ群**:258792161  (不限于dubbox,包括SOA设计、互联网技术等等兴趣交流)
+
+## Dubbox当前的主要功能
+
+* **支持REST风格远程调用(HTTP + JSON/XML)**:基于非常成熟的JBoss [RestEasy](http://resteasy.jboss.org/)框架,在dubbo中实现了REST风格(HTTP + JSON/XML)的远程调用,以显著简化企业内部的跨语言交互,同时显著简化企业对外的Open API、无线API甚至AJAX服务端等等的开发。事实上,这个REST调用也使得Dubbo可以对当今特别流行的“微服务”架构提供基础性支持。 另外,REST调用也达到了比较高的性能,在基准测试下,HTTP + JSON与Dubbo 2.x默认的RPC协议(即TCP + Hessian2二进制序列化)之间只有1.5倍左右的差距,详见文档中的基准测试报告。
+
+* **支持基于Kryo和FST的Java高效序列化实现**:基于当今比较知名的[Kryo](https://github.com/EsotericSoftware/kryo)和[FST](https://github.com/RuedigerMoeller/fast-serialization)高性能序列化库,为Dubbo默认的RPC协议添加新的序列化实现,并优化调整了其序列化体系,比较显著的提高了Dubbo RPC的性能,详见文档中的基准测试报告。
+
+* **支持基于Jackson的JSON序列化**:基于业界应用最广泛的[Jackson](http://jackson.codehaus.org/)序列化库,为Dubbo默认的RPC协议添加新的JSON序列化实现。
+
+* **支持基于嵌入式Tomcat的HTTP remoting体系**:基于嵌入式tomcat实现dubbo的HTTP remoting体系(即dubbo-remoting-http),用以逐步取代Dubbo中旧版本的嵌入式Jetty,可以显著的提高REST等的远程调用性能,并将Servlet API的支持从2.5升级到3.1。(注:除了REST,dubbo中的WebServices、Hessian、HTTP Invoker等协议都基于这个HTTP remoting体系)。
+
+* **升级Spring**:将dubbo中Spring由2.x升级到目前最常用的3.x版本,减少版本冲突带来的麻烦。
+
+* **升级ZooKeeper客户端**:将dubbo中的zookeeper客户端升级到最新的版本,以修正老版本中包含的bug。
+
+* **支持完全基于Java代码的Dubbo配置**:基于Spring的Java Config,实现完全无XML的纯Java代码方式来配置dubbo
+
+* **调整Demo应用**:暂时将dubbo的demo应用调整并改写以主要演示REST功能、Dubbo协议的新序列化方式、基于Java代码的Spring配置等等。
+
+* **修正了dubbo的bug** 包括配置、序列化、管理界面等等的bug。
+
+**注:dubbox和dubbo 2.x是兼容的,没有改变dubbo的任何已有的功能和配置方式(除了升级了spring之类的版本)**
+
+## 文档资料
+
+[在Dubbo中开发REST风格的远程调用(RESTful Remoting)](http://dangdangdotcom.github.io/dubbox/rest.html)
+
+[在Dubbo中使用高效的Java序列化(Kryo和FST)](http://dangdangdotcom.github.io/dubbox/serialization.html)
+
+[使用JavaConfig方式配置dubbox](http://dangdangdotcom.github.io/dubbox/java-config.html)
+
+[Dubbo Jackson序列化使用说明](http://dangdangdotcom.github.io/dubbox/jackson.html)
+
+[Demo应用简单运行指南](http://dangdangdotcom.github.io/dubbox/demo.html)
+
+[Dubbox@InfoQ](http://www.infoq.com/cn/news/2014/10/dubbox-open-source) 
+
+[Dubbox Wiki](https://github.com/dangdangdotcom/dubbox/wiki) (由社区志愿者自由编辑的)
+
+## 版本
+
+详见:https://github.com/dangdangdotcom/dubbox/releases
+
+* **dubbox-2.8.0**:主要支持REST风格远程调用、支持Kryo和FST序列化、升级了Spring和Zookeeper客户端、调整了demo应用等等
+* **dubbox-2.8.1**:主要支持基于嵌入式tomcat的http-remoting,优化了REST客户端性能,在REST中支持限制服务端接纳的最大HTTP连接数等等
+* **dubbox-2.8.2**:
+    * 支持REST中的HTTP logging,包括HTTP header的字段和HTTP body中的消息体,方便调试、日志纪录等等
+    * 提供辅助类便于REST的中文处理
+    * 改变使用`@Reference` annotation配置时的异常处理方式,即当用annotation配置时,过去dubbo在启动期间不抛出依赖服务找不到的异常,而是在具体调用时抛出NPE,这与用XML配置时的行为不一致。
+    * 较大的充实了Dubbo REST的文档
+* **dubbox-2.8.3**:
+    * 在REST中支持dubbo统一的方式用bean validation annotation作参数校验(沈理)
+    * 在RpcContext上支持获取底层协议的Request/Response(沈理)
+    * 支持采用Spring的Java Config方式配置dubbo(马金凯)
+    * 在Dubbo协议中支持基于Jackson的json序列化(Dylan)
+    * 在Spring AOP代理过的对象上支持dubbo annotation配置(Dylan)
+    * 修正Dubbo管理界面中没有consumer时出现空指针异常(马金凯)
+    * 修正@Reference annotation中protocol设置不起作用的bug(沈理)
+    * 修正@Reference annotation放在setter方法上即会出错的bug(Dylan)
+
+## 依赖
+
+从dubbox-2.8.4开始,所有依赖库的使用方式将和dubbo原来的一样:即如果要使用REST、Kyro、FST、Jackson等功能,需要用户自行手工添加相关的依赖。例如:
+
+### REST风格远程调用
+
+```xml
+<dependency>
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-jaxrs</artifactId>
+    <version>3.0.7.Final</version>
+</dependency>
+<dependency>
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-client</artifactId>
+    <version>3.0.7.Final</version>
+</dependency>
+<dependency>
+    <groupId>javax.validation</groupId>
+    <artifactId>validation-api</artifactId>
+    <version>1.0.0.GA</version>
+</dependency>
+
+<!-- 如果要使用json序列化 -->
+<dependency>
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-jackson-provider</artifactId>
+    <version>3.0.7.Final</version>
+</dependency>
+
+<!-- 如果要使用xml序列化 -->
+<dependency>
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-jaxb-provider</artifactId>
+    <version>3.0.7.Final</version>
+</dependency>
+
+<!-- 如果要使用netty server -->
+<dependency>
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-netty</artifactId>
+    <version>3.0.7.Final</version>
+</dependency>
+
+<!-- 如果要使用Sun HTTP server -->
+<dependency>
+    <groupId>org.jboss.resteasy</groupId>
+    <artifactId>resteasy-jdk-http</artifactId>
+    <version>3.0.7.Final</version>
+</dependency>
+
+<!-- 如果要使用tomcat server -->
+<dependency>
+    <groupId>org.apache.tomcat.embed</groupId>
+    <artifactId>tomcat-embed-core</artifactId>
+    <version>8.0.11</version>
+</dependency>
+<dependency>
+    <groupId>org.apache.tomcat.embed</groupId>
+    <artifactId>tomcat-embed-logging-juli</artifactId>
+    <version>8.0.11</version>
+</dependency>
+```
+
+### Kyro序列化
+
+```xml
+<dependency>
+    <groupId>com.esotericsoftware.kryo</groupId>
+    <artifactId>kryo</artifactId>
+    <version>2.24.0</version>
+</dependency>
+<dependency>
+    <groupId>de.javakaffee</groupId>
+    <artifactId>kryo-serializers</artifactId>
+    <version>0.26</version>
+</dependency>
+```
+
+### FST序列化
+
+```xml
+<dependency>
+    <groupId>de.ruedigermoeller</groupId>
+    <artifactId>fst</artifactId>
+    <version>1.55</version>
+</dependency>
+```
+
+### Jackson序列化
+
+```xml
+<dependency>
+    <groupId>com.fasterxml.jackson.core</groupId>
+    <artifactId>jackson-core</artifactId>
+    <version>2.3.3</version>
+</dependency>
+<dependency>
+    <groupId>com.fasterxml.jackson.core</groupId>
+    <artifactId>jackson-databind</artifactId>
+    <version>2.3.3</version>
+</dependency>
+```
+   
+## FAQ(暂存)
+
+### Dubbox需要什么版本的JDK?
+
+目前最好在JDK 1.7以上运行
+
+### Dubbo REST的服务能和Dubbo注册中心、监控中心集成吗?
+
+可以的,而且是自动集成的,也就是你在dubbo中开发的所有REST服务都会自动注册到服务册中心和监控中心,可以通过它们做管理。
+
+但是,只有当REST的消费端也是基于dubbo的时候,注册中心中的许多服务治理操作才能完全起作用。而如果消费端是非dubbo的,自然不受注册中心管理,所以其中很多操作是不会对消费端起作用的。
+
+### Dubbo REST中如何实现负载均衡和容错(failover)?
+
+如果dubbo REST的消费端也是dubbo的,则Dubbo REST和其他dubbo远程调用协议基本完全一样,由dubbo框架透明的在消费端做load balance、failover等等。
+
+如果dubbo REST的消费端是非dubbo的,甚至是非java的,则最好配置服务提供端的软负载均衡机制,目前可考虑用LVS、HAProxy、 Nginx等等对HTTP请求做负载均衡。
+
+### JAX-RS中重载的方法能够映射到同一URL地址吗?
+
+http://stackoverflow.com/questions/17196766/can-resteasy-choose-method-based-on-query-params
+
+### JAX-RS中作POST的方法能够接收多个参数吗?
+
+http://stackoverflow.com/questions/5553218/jax-rs-post-multiple-objects
\ No newline at end of file
diff --git a/dubbo-admin/pom.xml b/dubbo-admin/pom.xml
index 44ce306a69..ec2a30be84 100644
--- a/dubbo-admin/pom.xml
+++ b/dubbo-admin/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-admin</artifactId>
 	<packaging>war</packaging>
@@ -41,16 +41,12 @@
 			<groupId>com.alibaba.citrus</groupId>
 			<artifactId>citrus-webx-all</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>org.javassist</groupId>
 			<artifactId>javassist</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>org.jboss.netty</groupId>
+			<groupId>io.netty</groupId>
 			<artifactId>netty</artifactId>
 		</dependency>
 		<dependency>
@@ -86,7 +82,7 @@
 			<artifactId>zkclient</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>com.netflix.curator</groupId>
+			<groupId>org.apache.curator</groupId>
 			<artifactId>curator-framework</artifactId>
 		</dependency>
 		<dependency>
@@ -103,7 +99,7 @@
 		</dependency>
 		<dependency>
 			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
+			<artifactId>javax.servlet-api</artifactId>
 			<scope>provided</scope>
 		</dependency>
 		<dependency>
diff --git a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConsumerServiceImpl.java b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConsumerServiceImpl.java
index bd236c2932..106d3c0a16 100644
--- a/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConsumerServiceImpl.java
+++ b/dubbo-admin/src/main/java/com/alibaba/dubbo/governance/service/impl/ConsumerServiceImpl.java
@@ -76,6 +76,8 @@ public Consumer findConsumer(Long id) {
     public List<String> findAddressesByApplication(String application) {
         List<String> ret = new ArrayList<String>();
         ConcurrentMap<String, Map<Long, URL>> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
+        if(consumerUrls == null) return ret;
+        
         for(Map.Entry<String, Map<Long, URL>> e1 : consumerUrls.entrySet()) {
             Map<Long, URL> value = e1.getValue();
             for(Map.Entry<Long, URL> e2 : value.entrySet()) {
diff --git a/dubbo-cluster/pom.xml b/dubbo-cluster/pom.xml
index 1e9edf86e7..ec6af560cb 100644
--- a/dubbo-cluster/pom.xml
+++ b/dubbo-cluster/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-cluster</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-common/pom.xml b/dubbo-common/pom.xml
index 26e31c1e7c..0d5e9f761d 100644
--- a/dubbo-common/pom.xml
+++ b/dubbo-common/pom.xml
@@ -14,57 +14,77 @@
  - limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>com.alibaba</groupId>
-		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
-	</parent>
-	<artifactId>dubbo-common</artifactId>
-	<packaging>jar</packaging>
-	<name>${project.artifactId}</name>
-	<description>The common module of dubbo project</description>
-	<properties>
-		<skip_maven_deploy>true</skip_maven_deploy>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>commons-logging</groupId>
-			<artifactId>commons-logging-api</artifactId>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.javassist</groupId>
-			<artifactId>javassist</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>hessian-lite</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>fastjson</artifactId>
-			<scope>provided</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.jvnet.sorcerer</groupId>
-			<artifactId>sorcerer-javac</artifactId>
-			<scope>provided</scope>
-		</dependency>
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-parent</artifactId>
+        <version>2.8.4</version>
+    </parent>
+    <artifactId>dubbo-common</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The common module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>true</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>hessian-lite</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jvnet.sorcerer</groupId>
+            <artifactId>sorcerer-javac</artifactId>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>cglib</groupId>
             <artifactId>cglib-nodep</artifactId>
             <scope>test</scope>
         </dependency>
-	</dependencies>
+        <dependency>
+            <groupId>com.esotericsoftware.kryo</groupId>
+            <artifactId>kryo</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>de.javakaffee</groupId>
+            <artifactId>kryo-serializers</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>de.ruedigermoeller</groupId>
+            <artifactId>fst</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/Constants.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/Constants.java
index 7909a7e59e..2c712237bc 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/Constants.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/Constants.java
@@ -118,6 +118,8 @@
 
     public static final int     DEFAULT_THREADS                    = 200;
 
+    public static final boolean DEFAULT_KEEP_ALIVE = true;
+
     public static final int     DEFAULT_QUEUES                     = 0;
 
     public static final int     DEFAULT_ALIVE                      = 60 * 1000;
@@ -134,6 +136,8 @@
 
     public static final int     DEFAULT_CONNECT_TIMEOUT            = 3000;
 
+    public static final int     DEFAULT_REGISTRY_CONNECT_TIMEOUT   = 5000;
+
     public static final int     DEFAULT_RETRIES                    = 2;
 
     // default buffer size is 8k.
@@ -260,6 +264,16 @@
 
     public static final String  SERIALIZATION_KEY                  = "serialization";
 
+    // modified by lishen
+    public static final String EXTENSION_KEY = "extension";
+
+    // modified by lishen
+    public static final String  KEEP_ALIVE_KEY                  = "keepalive";
+
+    // modified by lishen
+    // TODO change to a better name
+    public static final String  OPTIMIZER_KEY                  = "optimizer";
+
     public static final String  EXCHANGER_KEY                      = "exchanger";
 
     public static final String  TRANSPORTER_KEY                    = "transporter";
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/DefaultJacksonObjectMapperProvider.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/DefaultJacksonObjectMapperProvider.java
new file mode 100644
index 0000000000..5b7bb51970
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/DefaultJacksonObjectMapperProvider.java
@@ -0,0 +1,22 @@
+package com.alibaba.dubbo.common.json;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+import java.util.TimeZone;
+
+/**
+ * @author dylan
+ */
+public class DefaultJacksonObjectMapperProvider implements JacksonObjectMapperProvider {
+    @Override
+    public ObjectMapper getObjectMapper() {
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
+//            objectMapper.disable(SerializationFeature.FLUSH_AFTER_WRITE_VALUE);
+        objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+        objectMapper.setTimeZone(TimeZone.getDefault());
+        return objectMapper;
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/J2oVisitor.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/J2oVisitor.java
index 132d5eff2f..1b378e09af 100644
--- a/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/J2oVisitor.java
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/J2oVisitor.java
@@ -165,17 +165,19 @@ public void objectItemValue(Object obj, boolean isValue) throws ParseException
 					}
 				}
 				if (mValue instanceof Throwable && "message".equals(name)) {
-					try {
-						Field field = Throwable.class.getDeclaredField("detailMessage");
-						if (! field.isAccessible()) {
-							field.setAccessible(true);
-						}
-						field.set(mValue, obj);
-					} catch (NoSuchFieldException e) {
-						throw new ParseException(StringUtils.toString(e));
-					} catch (IllegalAccessException e) {
-						throw new ParseException(StringUtils.toString(e));
-					}
+                    try {
+                        Field field = Throwable.class.getDeclaredField("detailMessage");
+                        if (!field.isAccessible()) {
+                            field.setAccessible(true);
+                        }
+                        field.set(mValue, obj);
+                    } catch (NoSuchFieldException e) {
+                        throw new ParseException(StringUtils.toString(e));
+                    } catch (IllegalAccessException e) {
+                        throw new ParseException(StringUtils.toString(e));
+                    }
+                } else if (mValue instanceof Throwable && "suppressed".equals(name)) { // modified by lishen
+                     // simply ignore this field for jdk 1.7+
 				} else if (! CLASS_PROPERTY.equals(name)) {
 					mWrapper.setPropertyValue(mValue, name, obj);
 				}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/Jackson.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/Jackson.java
new file mode 100644
index 0000000000..6bcd8d35cd
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/Jackson.java
@@ -0,0 +1,49 @@
+package com.alibaba.dubbo.common.json;
+
+import com.alibaba.dubbo.common.extension.ExtensionLoader;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.TimeZone;
+
+/**
+ * @author dylan
+ */
+public class Jackson {
+    private static Logger logger = LoggerFactory.getLogger(Jackson.class);
+    private static ObjectMapper objectMapper;
+
+    private static JacksonObjectMapperProvider getJacksonProvider() {
+        return ExtensionLoader.getExtensionLoader(JacksonObjectMapperProvider.class).getDefaultExtension();
+    }
+
+    /**
+     * 获取object mapper
+     *
+     * @return
+     */
+    public static ObjectMapper getObjectMapper() {
+        if (objectMapper == null) {
+            JacksonObjectMapperProvider jacksonObjectMapperProvider = getJacksonProvider();
+            if (jacksonObjectMapperProvider != null) {
+                objectMapper = jacksonObjectMapperProvider.getObjectMapper();
+            }
+        }
+        if (objectMapper == null) {
+            logger.warn("load objectMapper failed, use default config.");
+            buildDefaultObjectMapper();
+        }
+        return objectMapper;
+    }
+
+    private static synchronized void buildDefaultObjectMapper() {
+        objectMapper = new ObjectMapper();
+        objectMapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
+//            objectMapper.disable(SerializationFeature.FLUSH_AFTER_WRITE_VALUE);
+        objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+        objectMapper.setTimeZone(TimeZone.getDefault());
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/JacksonObjectMapperProvider.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/JacksonObjectMapperProvider.java
new file mode 100644
index 0000000000..70524bb77c
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/json/JacksonObjectMapperProvider.java
@@ -0,0 +1,12 @@
+package com.alibaba.dubbo.common.json;
+
+import com.alibaba.dubbo.common.extension.SPI;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * Created by dylan on 11/12/14.
+ */
+@SPI("jackson")
+public interface JacksonObjectMapperProvider {
+    public ObjectMapper getObjectMapper();
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/Cleanable.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/Cleanable.java
new file mode 100644
index 0000000000..1b69c56b4f
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/Cleanable.java
@@ -0,0 +1,24 @@
+/**
+ * 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.common.serialize;
+
+/**
+ * @author lishen
+ */
+public interface Cleanable {
+
+    void cleanup();
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/OptimizedSerialization.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/OptimizedSerialization.java
new file mode 100644
index 0000000000..9216327502
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/OptimizedSerialization.java
@@ -0,0 +1,24 @@
+/**
+ * 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.common.serialize;
+
+/**
+ * Just a marker interface for now
+ *
+ * @author lishen
+ */
+public interface OptimizedSerialization extends Serialization {
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/SerializableClassRegistry.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/SerializableClassRegistry.java
new file mode 100644
index 0000000000..3a09d41fe1
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/SerializableClassRegistry.java
@@ -0,0 +1,23 @@
+package com.alibaba.dubbo.common.serialize.support;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * @author lishen
+ */
+public abstract class SerializableClassRegistry {
+
+    private static final Set<Class> registrations = new LinkedHashSet<Class>();
+
+    /**
+     * only supposed to be called at startup time
+     */
+    public static void registerClass(Class clazz) {
+        registrations.add(clazz);
+    }
+
+    public static Set<Class> getRegisteredClasses() {
+        return registrations;
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/SerializationOptimizer.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/SerializationOptimizer.java
new file mode 100644
index 0000000000..0f6f7a10cd
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/SerializationOptimizer.java
@@ -0,0 +1,13 @@
+package com.alibaba.dubbo.common.serialize.support;
+
+import java.util.Collection;
+
+/**
+ * This class can be replaced with the contents in config file, but for now I think the class is easier to write
+ *
+ * @author lishen
+ */
+public interface SerializationOptimizer {
+
+    Collection<Class> getSerializableClasses();
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstFactory.java
new file mode 100644
index 0000000000..38b531eadb
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstFactory.java
@@ -0,0 +1,53 @@
+/**
+ * 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.common.serialize.support.fst;
+
+import com.alibaba.dubbo.common.serialize.support.SerializableClassRegistry;
+import de.ruedigermoeller.serialization.FSTConfiguration;
+import de.ruedigermoeller.serialization.FSTObjectInput;
+import de.ruedigermoeller.serialization.FSTObjectOutput;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * @author lishen
+ */
+public class FstFactory {
+
+    private static final FstFactory factory = new FstFactory();
+
+    private final FSTConfiguration conf = FSTConfiguration.createDefaultConfiguration();
+
+
+    public static FstFactory getDefaultFactory() {
+        return factory;
+    }
+
+    public FstFactory() {
+        for (Class clazz : SerializableClassRegistry.getRegisteredClasses()) {
+            conf.registerClass(clazz);
+        }
+    }
+
+    public FSTObjectOutput getObjectOutput(OutputStream outputStream) {
+        return conf.getObjectOutput(outputStream);
+    }
+
+    public FSTObjectInput getObjectInput(InputStream inputStream) {
+        return conf.getObjectInput(inputStream);
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstObjectInput.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstObjectInput.java
new file mode 100644
index 0000000000..01fd6ea8de
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstObjectInput.java
@@ -0,0 +1,95 @@
+/**
+ * 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.common.serialize.support.fst;
+
+import com.alibaba.dubbo.common.serialize.ObjectInput;
+import de.ruedigermoeller.serialization.FSTObjectInput;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+
+/**
+ * @author lishen
+ */
+public class FstObjectInput implements ObjectInput {
+
+    private FSTObjectInput input;
+
+    public FstObjectInput(InputStream inputStream) {
+        input = FstFactory.getDefaultFactory().getObjectInput(inputStream);
+    }
+
+    public boolean readBool() throws IOException {
+            return input.readBoolean();
+    }
+
+    public byte readByte() throws IOException {
+            return input.readByte();
+    }
+
+    public short readShort() throws IOException {
+            return input.readShort();
+    }
+
+    public int readInt() throws IOException {
+            return input.readInt();
+    }
+
+    public long readLong() throws IOException {
+            return input.readLong();
+    }
+
+    public float readFloat() throws IOException {
+            return input.readFloat();
+    }
+
+    public double readDouble() throws IOException {
+            return input.readDouble();
+    }
+
+    public byte[] readBytes() throws IOException {
+            int len = input.readInt();
+            if (len < 0) {
+                return null;
+            } else if (len == 0) {
+                return new byte[]{};
+            } else {
+                byte[] b = new byte[len];
+                input.readFully(b);
+                return b;
+            }
+    }
+
+    public String readUTF() throws IOException {
+            return input.readUTF();
+    }
+
+    public Object readObject() throws IOException, ClassNotFoundException {
+            return input.readObject();
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public <T> T readObject(Class<T> clazz) throws IOException, ClassNotFoundException {
+        return (T) readObject();
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> T readObject(Class<T> clazz, Type type) throws IOException, ClassNotFoundException {
+        return (T) readObject();
+    }
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstObjectOutput.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstObjectOutput.java
new file mode 100644
index 0000000000..ba14f041bb
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstObjectOutput.java
@@ -0,0 +1,92 @@
+/**
+ * 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.common.serialize.support.fst;
+
+import com.alibaba.dubbo.common.serialize.ObjectOutput;
+import de.ruedigermoeller.serialization.FSTObjectOutput;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author lishen
+ */
+public class FstObjectOutput implements ObjectOutput {
+
+    private FSTObjectOutput output;
+
+    public FstObjectOutput(OutputStream outputStream) {
+        output = FstFactory.getDefaultFactory().getObjectOutput(outputStream);
+    }
+
+    public void writeBool(boolean v) throws IOException {
+        output.writeBoolean(v);
+    }
+
+    public void writeByte(byte v) throws IOException {
+        output.writeByte(v);
+    }
+
+    public void writeShort(short v) throws IOException {
+        output.writeShort(v);
+    }
+
+    public void writeInt(int v) throws IOException {
+        output.writeInt(v);
+    }
+
+    public void writeLong(long v) throws IOException {
+        output.writeLong(v);
+    }
+
+    public void writeFloat(float v) throws IOException {
+        output.writeFloat(v);
+    }
+
+    public void writeDouble(double v) throws IOException {
+        output.writeDouble(v);
+    }
+
+    public void writeBytes(byte[] v) throws IOException {
+        if (v == null) {
+            output.writeInt(-1);
+        } else {
+            writeBytes(v, 0, v.length);
+        }
+    }
+
+    public void writeBytes(byte[] v, int off, int len) throws IOException {
+        if (v == null) {
+            output.writeInt(-1);
+        } else {
+            output.writeInt(len);
+            output.write(v, off, len);
+        }
+    }
+
+
+    public void writeUTF(String v) throws IOException {
+        output.writeUTF(v);
+    }
+
+    public void writeObject(Object v) throws IOException {
+        output.writeObject(v);
+    }
+
+    public void flushBuffer() throws IOException {
+        output.flush();
+    }
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstSerialization.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstSerialization.java
new file mode 100644
index 0000000000..dff215b60b
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/fst/FstSerialization.java
@@ -0,0 +1,47 @@
+/**
+ * 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.common.serialize.support.fst;
+
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.serialize.ObjectInput;
+import com.alibaba.dubbo.common.serialize.ObjectOutput;
+import com.alibaba.dubbo.common.serialize.OptimizedSerialization;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * @author lishen
+ */
+public class FstSerialization implements OptimizedSerialization {
+
+    public byte getContentTypeId() {
+        return 9;
+    }
+
+    public String getContentType() {
+        return "x-application/fst";
+    }
+
+    public ObjectOutput serialize(URL url, OutputStream out) throws IOException {
+        return new FstObjectOutput(out);
+    }
+
+    public ObjectInput deserialize(URL url, InputStream is) throws IOException {
+        return new FstObjectInput(is);
+    }
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonObjectInput.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonObjectInput.java
new file mode 100644
index 0000000000..f8a3c19cee
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonObjectInput.java
@@ -0,0 +1,178 @@
+/*
+ * 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.serialize.support.json;
+
+import com.alibaba.dubbo.common.json.Jackson;
+import com.alibaba.dubbo.common.serialize.ObjectInput;
+import com.alibaba.dubbo.common.utils.ReflectUtils;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+import java.util.Map;
+
+/**
+ * JsonObjectInput
+ *
+ * @author dylan
+ */
+public class JacksonObjectInput implements ObjectInput {
+    private static Logger logger = LoggerFactory.getLogger(JacksonObjectInput.class);
+
+    private final ObjectMapper objectMapper;
+    //    private final BufferedReader reader;
+    private final Map<String, String> data;
+    private static final String KEY_PREFIX = "$";
+    private int index = 0;
+
+    public JacksonObjectInput(InputStream inputstream) throws IOException {
+//        this.reader = new BufferedReader(new InputStreamReader(inputstream));
+//        String line = null;
+//        try {
+//            while ((line = reader.readLine()) != null) {
+//                System.out.println(line);
+//            }
+//        }catch(Exception e){
+//            e.printStackTrace();
+//        }
+        this.objectMapper = Jackson.getObjectMapper();
+        try {
+            data = objectMapper.readValue(inputstream, Map.class);
+        } catch (IOException e) {
+            logger.error("parse inputstream error.", e);
+            throw e;
+        }
+    }
+
+    public boolean readBool() throws IOException {
+        try {
+            return readObject(Boolean.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public byte readByte() throws IOException {
+        try {
+            return readObject(Byte.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public short readShort() throws IOException {
+        try {
+            return readObject(Short.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public int readInt() throws IOException {
+        try {
+            return readObject(Integer.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public long readLong() throws IOException {
+        try {
+            return readObject(Long.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public float readFloat() throws IOException {
+        try {
+            return readObject(Float.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public double readDouble() throws IOException {
+        try {
+            return readObject(Double.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public String readUTF() throws IOException {
+        try {
+            return readObject(String.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    public byte[] readBytes() throws IOException {
+        return readUTF().getBytes();
+    }
+
+    public Object readObject() throws IOException, ClassNotFoundException {
+//        try {
+//            String json = readLine();
+//            if (json.startsWith("{")) {
+//                return JSON.parse(json, Map.class);
+//            } else {
+//                json = "{\"value\":" + json + "}";
+//
+//                @SuppressWarnings("unchecked")
+//                Map<String, Object> map = objectMapper.readValue(json, Map.class);
+//                return map.get("value");
+//            }
+//        } catch (ParseException e) {
+//            throw new IOException(e.getMessage());
+//        }
+        try {
+            return readObject(Object.class);
+        } catch (ClassNotFoundException e) {
+            throw new IOException(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> T readObject(Class<T> cls) throws IOException, ClassNotFoundException {
+//        Object value = readObject();
+        //read data value
+        String json = this.data.get(KEY_PREFIX + (++index));
+        //read data type
+        String dataType = this.data.get(KEY_PREFIX + index + "t");
+        if (dataType != null) {
+            Class clazz = ReflectUtils.desc2class(dataType);
+            if (cls.isAssignableFrom(clazz)) {
+                cls = clazz;
+            } else {
+                throw new IllegalArgumentException("Class \"" + clazz + "\" is not inherited from \"" + cls + "\"");
+            }
+        }
+        logger.debug("index:{}, value:{}", index, json);
+        return objectMapper.readValue(json, cls);
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> T readObject(Class<T> cls, Type type) throws IOException, ClassNotFoundException {
+//        Object value = readObject();
+        return readObject(cls);
+    }
+
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonObjectOutput.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonObjectOutput.java
new file mode 100644
index 0000000000..b070c818c4
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonObjectOutput.java
@@ -0,0 +1,122 @@
+/*
+ * 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.serialize.support.json;
+
+import com.alibaba.dubbo.common.json.Jackson;
+import com.alibaba.dubbo.common.serialize.ObjectOutput;
+import com.alibaba.dubbo.common.utils.ReflectUtils;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.*;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * jackson object output
+ *
+ * @author dylan
+ */
+public class JacksonObjectOutput implements ObjectOutput {
+
+    private final ObjectMapper objectMapper;
+    private final Map<String, Object> data;
+    private final static String KEY_PREFIX = "$";
+    private int index = 0;
+
+    private final PrintWriter writer;
+
+    public JacksonObjectOutput(OutputStream out) {
+        this(new OutputStreamWriter(out));
+    }
+
+    public JacksonObjectOutput(Writer writer) {
+        this.objectMapper = Jackson.getObjectMapper();
+        this.writer = new PrintWriter(writer);
+        this.data = new HashMap<String, Object>();
+    }
+
+    public void writeBool(boolean v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeByte(byte v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeShort(short v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeInt(int v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeLong(long v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeFloat(float v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeDouble(double v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeUTF(String v) throws IOException {
+        writeObject0(v);
+    }
+
+    public void writeBytes(byte[] b) throws IOException {
+        writeObject0(new String(b));
+    }
+
+    public void writeBytes(byte[] b, int off, int len) throws IOException {
+        writeObject0(new String(b, off, len));
+    }
+
+    public void writeObject(Object obj) throws IOException {
+//        int i = ++index;
+        if (obj == null) {
+            writeObject0(obj);
+            return;
+        }
+        //write data value
+        writeObject0(obj);
+        //write data type
+        Class c = obj.getClass();
+        String desc = ReflectUtils.getDesc(c);
+        data.put(KEY_PREFIX + (index) + "t", desc);
+//        if (obj instanceof Collection) {
+//            //集合类型
+//        } else if (obj instanceof Map) {
+//            //
+//        } else {
+//        }
+    }
+
+    private void writeObject0(Object obj) throws IOException {
+        data.put(KEY_PREFIX + (++index), objectMapper.writeValueAsString(obj));
+    }
+
+    public void flushBuffer() throws IOException {
+        objectMapper.writeValue(writer, data);
+        writer.println();
+        writer.flush();
+    }
+
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonSerialization.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonSerialization.java
new file mode 100644
index 0000000000..2729cef5c3
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/json/JacksonSerialization.java
@@ -0,0 +1,50 @@
+/*
+ * 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.serialize.support.json;
+
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.serialize.ObjectInput;
+import com.alibaba.dubbo.common.serialize.ObjectOutput;
+import com.alibaba.dubbo.common.serialize.Serialization;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * JsonSerialization
+ * 
+ * @author dylan
+ */
+public class JacksonSerialization implements Serialization {
+
+    public byte getContentTypeId() {
+        return 20;
+    }
+
+    public String getContentType() {
+        return "text/json";
+    }
+    
+    public ObjectOutput serialize(URL url, OutputStream output) throws IOException {
+        return new JacksonObjectOutput(output);
+    }
+
+    public ObjectInput deserialize(URL url, InputStream input) throws IOException {
+        return new JacksonObjectInput(input);
+    }
+    
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/CompatibleKryo.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/CompatibleKryo.java
new file mode 100644
index 0000000000..8ab2a9ecfd
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/CompatibleKryo.java
@@ -0,0 +1,45 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.esotericsoftware.kryo.Kryo;
+import com.esotericsoftware.kryo.Serializer;
+import com.esotericsoftware.kryo.serializers.JavaSerializer;
+
+/**
+ * @author lishen
+ */
+public class CompatibleKryo extends Kryo {
+
+    private static final Logger logger = LoggerFactory.getLogger(CompatibleKryo.class);
+
+    @Override
+    public Serializer getDefaultSerializer(Class type) {
+        if (type == null) {
+            throw new IllegalArgumentException("type cannot be null.");
+        }
+
+        if (!type.isArray() && !ReflectionUtils.checkZeroArgConstructor(type)) {
+            if (logger.isWarnEnabled()) {
+                logger.warn(type + " has no zero-arg constructor and this will affect the serialization performance");
+            }
+            return new JavaSerializer();
+        }
+        return super.getDefaultSerializer(type);
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoFactory.java
new file mode 100644
index 0000000000..a06efef1c4
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoFactory.java
@@ -0,0 +1,142 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.alibaba.dubbo.common.serialize.support.SerializableClassRegistry;
+import com.esotericsoftware.kryo.Kryo;
+import com.esotericsoftware.kryo.serializers.DefaultSerializers;
+import de.javakaffee.kryoserializers.*;
+
+import java.lang.reflect.InvocationHandler;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.regex.Pattern;
+
+/**
+ * @author lishen
+ */
+public abstract class KryoFactory {
+
+//    private static final KryoFactory factory = new PrototypeKryoFactory();
+//    private static final KryoFactory factory = new SingletonKryoFactory();
+    private static final KryoFactory factory = new PooledKryoFactory();
+
+    private final Set<Class> registrations = new LinkedHashSet<Class>();
+
+    private boolean registrationRequired;
+
+    private volatile boolean kryoCreated;
+
+    protected KryoFactory() {
+        // TODO configurable
+//        Log.DEBUG();
+    }
+
+    public static KryoFactory getDefaultFactory() {
+        return factory;
+    }
+
+    /**
+     * only supposed to be called at startup time
+     *
+     *  later may consider adding support for custom serializer, custom id, etc
+     */
+    public void registerClass(Class clazz) {
+
+        if (kryoCreated) {
+            throw new IllegalStateException("Can't register class after creating kryo instance");
+        }
+        registrations.add(clazz);
+    }
+
+    protected Kryo createKryo() {
+        if (!kryoCreated) {
+            kryoCreated = true;
+        }
+
+        Kryo kryo = new CompatibleKryo();
+
+        // TODO
+//        kryo.setReferences(false);
+        kryo.setRegistrationRequired(registrationRequired);
+
+        kryo.register(Arrays.asList("").getClass(), new ArraysAsListSerializer());
+        kryo.register(GregorianCalendar.class, new GregorianCalendarSerializer());
+        kryo.register(InvocationHandler.class, new JdkProxySerializer());
+        kryo.register(BigDecimal.class, new DefaultSerializers.BigDecimalSerializer());
+        kryo.register(BigInteger.class, new DefaultSerializers.BigIntegerSerializer());
+        kryo.register(Pattern.class, new RegexSerializer());
+        kryo.register(BitSet.class, new BitSetSerializer());
+        kryo.register(URI.class, new URISerializer());
+        kryo.register(UUID.class, new UUIDSerializer());
+        UnmodifiableCollectionsSerializer.registerSerializers(kryo);
+        SynchronizedCollectionsSerializer.registerSerializers(kryo);
+
+        // now just added some very common classes
+        // TODO optimization
+        kryo.register(HashMap.class);
+        kryo.register(ArrayList.class);
+        kryo.register(LinkedList.class);
+        kryo.register(HashSet.class);
+        kryo.register(TreeSet.class);
+        kryo.register(Hashtable.class);
+        kryo.register(Date.class);
+        kryo.register(Calendar.class);
+        kryo.register(ConcurrentHashMap.class);
+        kryo.register(SimpleDateFormat.class);
+        kryo.register(GregorianCalendar.class);
+        kryo.register(Vector.class);
+        kryo.register(BitSet.class);
+        kryo.register(StringBuffer.class);
+        kryo.register(StringBuilder.class);
+        kryo.register(Object.class);
+        kryo.register(Object[].class);
+        kryo.register(String[].class);
+        kryo.register(byte[].class);
+        kryo.register(char[].class);
+        kryo.register(int[].class);
+        kryo.register(float[].class);
+        kryo.register(double[].class);
+
+        for (Class clazz : registrations) {
+            kryo.register(clazz);
+        }
+
+        for (Class clazz : SerializableClassRegistry.getRegisteredClasses()) {
+            kryo.register(clazz);
+        }
+
+        return kryo;
+    }
+
+    public void returnKryo(Kryo kryo) {
+        // do nothing by default
+    }
+
+    public void setRegistrationRequired(boolean registrationRequired) {
+        this.registrationRequired = registrationRequired;
+    }
+
+    public void close() {
+        // do nothing by default
+    }
+
+    public abstract Kryo getKryo();
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoObjectInput.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoObjectInput.java
new file mode 100644
index 0000000000..e441a64c21
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoObjectInput.java
@@ -0,0 +1,158 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.alibaba.dubbo.common.serialize.Cleanable;
+import com.alibaba.dubbo.common.serialize.ObjectInput;
+import com.esotericsoftware.kryo.Kryo;
+import com.esotericsoftware.kryo.KryoException;
+import com.esotericsoftware.kryo.io.Input;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Type;
+
+/**
+ * @author lishen
+ */
+public class KryoObjectInput implements ObjectInput, Cleanable {
+
+    private Kryo kryo = KryoFactory.getDefaultFactory().getKryo();
+    private Input input;
+
+    public KryoObjectInput(InputStream inputStream) {
+        input = new Input(inputStream);
+    }
+
+    public boolean readBool() throws IOException {
+        try {
+            return input.readBoolean();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public byte readByte() throws IOException {
+        try {
+            return input.readByte();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public short readShort() throws IOException {
+        try {
+            return input.readShort();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public int readInt() throws IOException {
+        try {
+            return input.readInt();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public long readLong() throws IOException {
+        try {
+            return input.readLong();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public float readFloat() throws IOException {
+        try {
+            return input.readFloat();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public double readDouble() throws IOException {
+        try {
+            return input.readDouble();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public byte[] readBytes() throws IOException {
+        try {
+            int len = input.readInt();
+            if (len < 0) {
+                return null;
+            } else if (len == 0) {
+                return new byte[]{};
+            } else {
+                return input.readBytes(len);
+            }
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public String readUTF() throws IOException {
+        // TODO
+        try {
+//            return kryo.readObject(input, String.class);
+            return input.readString();
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+    public Object readObject() throws IOException, ClassNotFoundException {
+        // TODO
+//        throw new UnsupportedOperationException();
+        try {
+            return kryo.readClassAndObject(input);
+        } catch (KryoException e) {
+            throw new IOException(e);
+        }
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public <T> T readObject(Class<T> clazz) throws IOException, ClassNotFoundException {
+        // TODO optimization
+//            try {
+//                return (T) kryo.readClassAndObject(input);
+//            } catch (KryoException e) {
+//                throw new IOException(e);
+//            }
+        return (T) readObject();
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> T readObject(Class<T> clazz, Type type) throws IOException, ClassNotFoundException {
+//            try {
+//                return readObject(clazz);
+//            } catch (KryoException e) {
+//                throw new IOException(e);
+//            }
+        // TODO optimization
+        return (T) readObject(clazz);
+    }
+
+    public void cleanup() {
+        KryoFactory.getDefaultFactory().returnKryo(kryo);
+        kryo = null;
+    }
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoObjectOutput.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoObjectOutput.java
new file mode 100644
index 0000000000..fb127be602
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoObjectOutput.java
@@ -0,0 +1,102 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.alibaba.dubbo.common.serialize.Cleanable;
+import com.alibaba.dubbo.common.serialize.ObjectOutput;
+import com.esotericsoftware.kryo.Kryo;
+import com.esotericsoftware.kryo.io.Output;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author lishen
+ */
+public class KryoObjectOutput implements ObjectOutput, Cleanable {
+
+    private Kryo kryo = KryoFactory.getDefaultFactory().getKryo();
+    private Output output;
+
+    public KryoObjectOutput(OutputStream outputStream) {
+        output = new Output(outputStream);
+    }
+
+    public void writeBool(boolean v) throws IOException {
+        output.writeBoolean(v);
+    }
+
+    public void writeByte(byte v) throws IOException {
+        output.writeByte(v);
+    }
+
+    public void writeShort(short v) throws IOException {
+        output.writeShort(v);
+    }
+
+    public void writeInt(int v) throws IOException {
+        output.writeInt(v);
+    }
+
+    public void writeLong(long v) throws IOException {
+        output.writeLong(v);
+    }
+
+    public void writeFloat(float v) throws IOException {
+        output.writeFloat(v);
+    }
+
+    public void writeDouble(double v) throws IOException {
+        output.writeDouble(v);
+    }
+
+    public void writeBytes(byte[] v) throws IOException {
+        if (v == null) {
+            output.writeInt(-1);
+        } else {
+            writeBytes(v, 0, v.length);
+        }
+    }
+
+    public void writeBytes(byte[] v, int off, int len) throws IOException {
+        if (v == null) {
+            output.writeInt(-1);
+        } else {
+            output.writeInt(len);
+            output.write(v, off, len);
+        }
+    }
+
+
+    public void writeUTF(String v) throws IOException {
+        // TODO
+        output.writeString(v);
+//        kryo.writeObject(output, v);
+    }
+
+    public void writeObject(Object v) throws IOException {
+        kryo.writeClassAndObject(output, v);
+    }
+
+    public void flushBuffer() throws IOException {
+        output.flush();
+    }
+
+    public void cleanup() {
+        KryoFactory.getDefaultFactory().returnKryo(kryo);
+        kryo = null;
+    }
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoSerialization.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoSerialization.java
new file mode 100644
index 0000000000..07766cb4c5
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/KryoSerialization.java
@@ -0,0 +1,49 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.serialize.ObjectInput;
+import com.alibaba.dubbo.common.serialize.ObjectOutput;
+import com.alibaba.dubbo.common.serialize.OptimizedSerialization;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * TODO for now kryo serialization doesn't deny classes that don't implement the serializable interface
+ *
+ * @author lishen
+ */
+public class KryoSerialization implements OptimizedSerialization {
+
+    public byte getContentTypeId() {
+        return 8;
+    }
+
+    public String getContentType() {
+        return "x-application/kryo";
+    }
+
+    public ObjectOutput serialize(URL url, OutputStream out) throws IOException {
+        return new KryoObjectOutput(out);
+    }
+
+    public ObjectInput deserialize(URL url, InputStream is) throws IOException {
+        return new KryoObjectInput(is);
+    }
+}
\ No newline at end of file
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/PooledKryoFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/PooledKryoFactory.java
new file mode 100644
index 0000000000..7c2cfa5a6a
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/PooledKryoFactory.java
@@ -0,0 +1,47 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.esotericsoftware.kryo.Kryo;
+
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+/**
+ * @author lishen
+ */
+public class PooledKryoFactory extends KryoFactory {
+
+    private final Queue<Kryo> pool = new ConcurrentLinkedQueue<Kryo>();
+
+    @Override
+    public void returnKryo(Kryo kryo) {
+        pool.offer(kryo);
+    }
+
+    @Override
+    public void close() {
+        pool.clear();
+    }
+
+    public Kryo getKryo() {
+        Kryo kryo = pool.poll();
+        if (kryo == null) {
+            kryo = createKryo();
+        }
+        return kryo;
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/PrototypeKryoFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/PrototypeKryoFactory.java
new file mode 100644
index 0000000000..06c18787cb
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/PrototypeKryoFactory.java
@@ -0,0 +1,28 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.esotericsoftware.kryo.Kryo;
+
+/**
+ * @author lishen
+ */
+public class PrototypeKryoFactory extends KryoFactory {
+
+    public Kryo getKryo() {
+        return createKryo();
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/ReflectionUtils.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/ReflectionUtils.java
new file mode 100644
index 0000000000..40997fe399
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/ReflectionUtils.java
@@ -0,0 +1,31 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+/**
+ * @author lishen
+ */
+public abstract class ReflectionUtils {
+
+    public static boolean checkZeroArgConstructor(Class clazz) {
+        try {
+            clazz.getDeclaredConstructor();
+            return true;
+        } catch (NoSuchMethodException e) {
+            return false;
+        }
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/SingletonKryoFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/SingletonKryoFactory.java
new file mode 100644
index 0000000000..2e3aefd487
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/SingletonKryoFactory.java
@@ -0,0 +1,37 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.esotericsoftware.kryo.Kryo;
+
+/**
+ * CAUSION this is only for test purpose since both kryo and this class are not thread-safe
+ *
+ * @author lishen
+ */
+public class SingletonKryoFactory extends KryoFactory {
+
+//    private final Kryo instance = createKryo();
+    private Kryo instance;
+
+    @Override
+    public Kryo getKryo() {
+        if (instance == null) {
+            instance = createKryo();
+        }
+        return instance;
+    }
+}
diff --git a/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/ThreadLocalKryoFactory.java b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/ThreadLocalKryoFactory.java
new file mode 100644
index 0000000000..aee8659ab5
--- /dev/null
+++ b/dubbo-common/src/main/java/com/alibaba/dubbo/common/serialize/support/kryo/ThreadLocalKryoFactory.java
@@ -0,0 +1,35 @@
+/**
+ * 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.common.serialize.support.kryo;
+
+import com.esotericsoftware.kryo.Kryo;
+
+/**
+ * @author lishen
+ */
+public class ThreadLocalKryoFactory extends KryoFactory {
+
+    private final ThreadLocal<Kryo> holder  = new ThreadLocal<Kryo>() {
+        @Override
+        protected Kryo initialValue() {
+            return createKryo();
+        }
+    };
+
+    public Kryo getKryo() {
+        return holder.get();
+    }
+}
diff --git a/dubbo-common/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.common.json.JacksonObjectMapperProvider b/dubbo-common/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.common.json.JacksonObjectMapperProvider
new file mode 100644
index 0000000000..73e8cf261f
--- /dev/null
+++ b/dubbo-common/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.common.json.JacksonObjectMapperProvider
@@ -0,0 +1 @@
+jackson=com.alibaba.dubbo.common.json.DefaultJacksonObjectMapperProvider
\ No newline at end of file
diff --git a/dubbo-common/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization b/dubbo-common/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization
index ca493e4579..2362c9acb8 100644
--- a/dubbo-common/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization
+++ b/dubbo-common/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization
@@ -4,4 +4,7 @@ java=com.alibaba.dubbo.common.serialize.support.java.JavaSerialization
 compactedjava=com.alibaba.dubbo.common.serialize.support.java.CompactedJavaSerialization
 json=com.alibaba.dubbo.common.serialize.support.json.JsonSerialization
 fastjson=com.alibaba.dubbo.common.serialize.support.json.FastJsonSerialization
-nativejava=com.alibaba.dubbo.common.serialize.support.nativejava.NativeJavaSerialization
\ No newline at end of file
+nativejava=com.alibaba.dubbo.common.serialize.support.nativejava.NativeJavaSerialization
+kryo=com.alibaba.dubbo.common.serialize.support.kryo.KryoSerialization
+fst=com.alibaba.dubbo.common.serialize.support.fst.FstSerialization
+jackson=com.alibaba.dubbo.common.serialize.support.json.JacksonSerialization
\ No newline at end of file
diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/json/JacksonTest.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/json/JacksonTest.java
new file mode 100644
index 0000000000..558e9735bf
--- /dev/null
+++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/json/JacksonTest.java
@@ -0,0 +1,177 @@
+package com.alibaba.dubbo.common.json;
+
+import com.alibaba.dubbo.common.serialize.support.json.FastJsonObjectOutput;
+import com.alibaba.dubbo.common.serialize.support.json.JacksonObjectInput;
+import com.alibaba.dubbo.common.serialize.support.json.JacksonObjectOutput;
+import com.alibaba.dubbo.common.utils.CollectionUtils;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.junit.Test;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Created by dylan on 11/13/14.
+ */
+public class JacksonTest {
+    @Test
+    public void testWrite() throws  Exception{
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        JacksonObjectOutput output = new JacksonObjectOutput(bos);
+//        PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out));
+        output.writeUTF("2.0.0");
+        output.writeBool(true);
+        output.writeByte((byte) 2);
+        output.writeBytes(new String("abc").getBytes());
+        output.writeDouble(2.0d);
+        output.writeFloat(3.05f);
+        output.writeInt(32);
+        output.writeLong(64L);
+        output.writeShort((short) 16);
+        output.writeBytes(new String("afdsafdsafsa").getBytes(), 6, 4);
+        output.writeObject(new String[]{"abc", "def", "gfk"});
+        output.writeObject(new int[]{4,5,8});
+        output.writeObject(new JacksonBean());
+        output.flushBuffer();
+
+        JacksonObjectInput input = new JacksonObjectInput(new ByteArrayInputStream(bos.toByteArray()));
+        System.out.println(input.readUTF());
+        System.out.println(input.readBool());
+        System.out.println(input.readByte());
+        System.out.println(new String(input.readBytes()));
+        System.out.println(input.readDouble());
+        System.out.println(input.readFloat());
+        System.out.println(input.readInt());
+        System.out.println(input.readLong());
+        System.out.println(input.readShort());
+        System.out.println(Arrays.toString(input.readBytes()));
+        System.out.println(Arrays.toString(input.readObject(String[].class)));
+        System.out.println(Arrays.toString(input.readObject(int[].class)));
+        JacksonBean jacksonBean = input.readObject(JacksonBean.class);
+        System.out.println(jacksonBean);
+
+    }
+    public static class JacksonBean {
+        private boolean bValue = true;
+        private String sValue = "string";
+        private int iValue = 20;
+        private double dValue = 20.5;
+        private float fValue = 2.18f;
+        private long lValue = 3;
+        private Double dValue2 = null;
+        private List<InnerBean> innerBeanList = new ArrayList<InnerBean>();
+
+        public JacksonBean(){
+            innerBeanList.add(new InnerBean());
+            innerBeanList.add(new InnerBean());
+        }
+        @Override
+        public String toString() {
+            return "JacksonBean{" +
+                    "bValue=" + bValue +
+                    ", sValue='" + sValue + '\'' +
+                    ", iValue=" + iValue +
+                    ", dValue=" + dValue +
+                    ", fValue=" + fValue +
+                    ", lValue=" + lValue +
+                    ", dValue2=" + dValue2 +
+                    ", innerBeanList=" + innerBeanList +
+                    '}';
+        }
+
+        public boolean isbValue() {
+            return bValue;
+        }
+
+        public void setbValue(boolean bValue) {
+            this.bValue = bValue;
+        }
+
+        public String getsValue() {
+            return sValue;
+        }
+
+        public void setsValue(String sValue) {
+            this.sValue = sValue;
+        }
+
+        public int getiValue() {
+            return iValue;
+        }
+
+        public void setiValue(int iValue) {
+            this.iValue = iValue;
+        }
+
+        public double getdValue() {
+            return dValue;
+        }
+
+        public void setdValue(double dValue) {
+            this.dValue = dValue;
+        }
+
+        public float getfValue() {
+            return fValue;
+        }
+
+        public void setfValue(float fValue) {
+            this.fValue = fValue;
+        }
+
+        public long getlValue() {
+            return lValue;
+        }
+
+        public void setlValue(long lValue) {
+            this.lValue = lValue;
+        }
+
+        public Double getdValue2() {
+            return dValue2;
+        }
+
+        public void setdValue2(Double dValue2) {
+            this.dValue2 = dValue2;
+        }
+
+        public List<InnerBean> getInnerBeanList() {
+            return innerBeanList;
+        }
+
+        public void setInnerBeanList(List<InnerBean> innerBeanList) {
+            this.innerBeanList = innerBeanList;
+        }
+    }
+
+    public static class InnerBean {
+        private String siValue = "innerStr";
+        private int iiValue = 18;
+
+        public String getSiValue() {
+            return siValue;
+        }
+
+        public void setSiValue(String siValue) {
+            this.siValue = siValue;
+        }
+
+        public int getIiValue() {
+            return iiValue;
+        }
+
+        public void setIiValue(int iiValue) {
+            this.iiValue = iiValue;
+        }
+
+        @Override
+        public String toString() {
+            return "InnerBean{" +
+                    "siValue='" + siValue + '\'' +
+                    ", iiValue=" + iiValue +
+                    '}';
+        }
+    }
+}
diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/FstSerializationTest.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/FstSerializationTest.java
new file mode 100644
index 0000000000..02932765df
--- /dev/null
+++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/FstSerializationTest.java
@@ -0,0 +1,13 @@
+package com.alibaba.dubbo.common.serialize.serialization;
+
+import com.alibaba.dubbo.common.serialize.support.kryo.KryoSerialization;
+
+/**
+ * @author lishen
+ */
+public class FstSerializationTest extends AbstractSerializationTest {
+
+    {
+        serialization = new KryoSerialization();
+    }
+}
diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/KyroSerializationTest.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/KyroSerializationTest.java
new file mode 100644
index 0000000000..244a49fa1d
--- /dev/null
+++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/KyroSerializationTest.java
@@ -0,0 +1,13 @@
+package com.alibaba.dubbo.common.serialize.serialization;
+
+import com.alibaba.dubbo.common.serialize.support.kryo.KryoSerialization;
+
+/**
+ * @author lishen
+ */
+public class KyroSerializationTest extends AbstractSerializationTest {
+
+    {
+        serialization = new KryoSerialization();
+    }
+}
\ No newline at end of file
diff --git a/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/ReflectionUtilsTest.java b/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/ReflectionUtilsTest.java
new file mode 100644
index 0000000000..f4ef790ec6
--- /dev/null
+++ b/dubbo-common/src/test/java/com/alibaba/dubbo/common/serialize/serialization/ReflectionUtilsTest.java
@@ -0,0 +1,34 @@
+package com.alibaba.dubbo.common.serialize.serialization;
+
+import com.alibaba.dubbo.common.serialize.support.kryo.ReflectionUtils;
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+
+
+/**
+ * @author lishen
+ */
+public class ReflectionUtilsTest {
+
+    @Test
+    public void test() {
+        assertTrue(ReflectionUtils.checkZeroArgConstructor(String.class));
+        assertTrue(ReflectionUtils.checkZeroArgConstructor(Bar.class));
+        assertFalse(ReflectionUtils.checkZeroArgConstructor(Foo.class));
+    }
+
+    static class Foo {
+        public Foo(int i) {
+
+        }
+    }
+
+    static class Bar {
+        private Bar() {
+
+        }
+    }
+}
diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml
index 4affbcc72a..d1f6a82c9c 100644
--- a/dubbo-config/dubbo-config-api/pom.xml
+++ b/dubbo-config/dubbo-config-api/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-config</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-config-api</artifactId>
 	<packaging>jar</packaging>
@@ -80,9 +80,9 @@
 		</dependency>
 		<dependency>
 			<groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-injvm</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
+			<artifactId>dubbo-rpc-injvm</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
 		<dependency>
 			<groupId>com.alibaba</groupId>
 			<artifactId>dubbo-remoting-netty</artifactId>
@@ -99,11 +99,22 @@
 			<artifactId>hibernate-validator</artifactId>
 			<scope>test</scope>
 		</dependency>
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>dubbo-registry-multicast</artifactId>
-            <version>${project.parent.version}</version>
-            <scope>test</scope>
-        </dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>dubbo-registry-multicast</artifactId>
+			<version>${project.parent.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-beans</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>aopalliance</groupId>
+			<artifactId>aopalliance</artifactId>
+			<version>1.0</version>
+			<scope>test</scope>
+		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java
index afa206274f..8e592bd973 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ProtocolConfig.java
@@ -117,6 +117,16 @@
     
     // 是否注册
     private Boolean             register;
+
+    // 是否长连接
+    // TODO add this to provider config
+    private Boolean keepAlive;
+
+    // 序列化的优化器的实现类名
+    // TODO add this to provider config
+    private String optimizer;
+
+    private String extension;
     
     // 参数
     private Map<String, String> parameters;
@@ -419,6 +429,30 @@ public void setDefault(Boolean isDefault) {
         this.isDefault = isDefault;
     }
 
+    public Boolean getKeepAlive() {
+        return keepAlive;
+    }
+
+    public void setKeepAlive(Boolean keepAlive) {
+        this.keepAlive = keepAlive;
+    }
+
+    public String getOptimizer() {
+        return optimizer;
+    }
+
+    public void setOptimizer(String optimizer) {
+        this.optimizer = optimizer;
+    }
+
+    public String getExtension() {
+        return extension;
+    }
+
+    public void setExtension(String extension) {
+        this.extension = extension;
+    }
+
     public void destory() {
         if (name != null) {
             ExtensionLoader.getExtensionLoader(Protocol.class).getExtension(name).destroy();;
diff --git a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java
index 2d420fdd60..76a393a5ac 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java
@@ -45,6 +45,7 @@
 import com.alibaba.dubbo.rpc.Protocol;
 import com.alibaba.dubbo.rpc.ProxyFactory;
 import com.alibaba.dubbo.rpc.cluster.ConfiguratorFactory;
+import com.alibaba.dubbo.rpc.ServiceClassHolder;
 import com.alibaba.dubbo.rpc.service.GenericService;
 import com.alibaba.dubbo.rpc.support.ProtocolUtils;
 
@@ -507,6 +508,10 @@ private void exportLocal(URL url) {
                     .setProtocol(Constants.LOCAL_PROTOCOL)
                     .setHost(NetUtils.LOCALHOST)
                     .setPort(0);
+
+            // modified by lishen
+            ServiceClassHolder.getInstance().pushServiceClass(getServiceClass(ref));
+
             Exporter<?> exporter = protocol.export(
                     proxyFactory.getInvoker(ref, (Class) interfaceClass, local));
             exporters.add(exporter);
@@ -514,6 +519,10 @@ private void exportLocal(URL url) {
         }
     }
 
+    protected Class getServiceClass(T ref) {
+        return ref.getClass();
+    }
+
     private void checkDefault() {
         if (provider == null) {
             provider = new ProviderConfig();
diff --git a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/annotation/Reference.java b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/annotation/Reference.java
index e1d8ffddd0..6d40336283 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/annotation/Reference.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/annotation/Reference.java
@@ -110,6 +110,8 @@
 
     String monitor() default "";
 
+    String protocol() default "";
+
     String[] registry() default {};
 
 }
diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml
index 274f7791ba..9732dff29d 100644
--- a/dubbo-config/dubbo-config-spring/pom.xml
+++ b/dubbo-config/dubbo-config-spring/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-config</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-config-spring</artifactId>
 	<packaging>jar</packaging>
@@ -36,7 +36,11 @@
 		</dependency>
 		<dependency>
 			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
+			<artifactId>spring-beans</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
 		</dependency>
 		<dependency>
 			<groupId>com.alibaba</groupId>
@@ -64,9 +68,9 @@
 		</dependency>
 		<dependency>
 			<groupId>com.alibaba</groupId>
-            <artifactId>dubbo-rpc-injvm</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
+			<artifactId>dubbo-rpc-injvm</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
 		<dependency>
 			<groupId>com.alibaba</groupId>
 			<artifactId>dubbo-remoting-netty</artifactId>
@@ -86,30 +90,15 @@
 	</dependencies>
 	<build>
 		<plugins>
-			<!-- upload xsd file command line
-			mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-single -Dwagon.fromFile=src/main/resources/META-INF/dubbo.xsd -Dwagon.url=dav:http://code.alibabatech.com/schema/dubbo/ -Dwagon.serverId=opensesame.releases.account
-			-->
-			<!--
-			<plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>wagon-maven-plugin</artifactId>
-				<version>1.0-beta-3</version>
-				<executions>
-					<execution>
-						<id>upload-schema</id>
-						<phase>deploy</phase>
-						<goals>
-							<goal>upload-single</goal>
-						</goals>
-						<configuration>
-							<fromFile>${basedir}/src/main/resources/META-INF/dubbo.xsd</fromFile>
-							<url>dav:http://code.alibabatech.com/schema/dubbo/</url>
-							<serverId>opensesame.releases.account</serverId>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			-->
+			<!-- upload xsd file command line mvn org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-single 
+				-Dwagon.fromFile=src/main/resources/META-INF/dubbo.xsd -Dwagon.url=dav:http://code.alibabatech.com/schema/dubbo/ 
+				-Dwagon.serverId=opensesame.releases.account -->
+			<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> 
+				<version>1.0-beta-3</version> <executions> <execution> <id>upload-schema</id> 
+				<phase>deploy</phase> <goals> <goal>upload-single</goal> </goals> <configuration> 
+				<fromFile>${basedir}/src/main/resources/META-INF/dubbo.xsd</fromFile> <url>dav:http://code.alibabatech.com/schema/dubbo/</url> 
+				<serverId>opensesame.releases.account</serverId> </configuration> </execution> 
+				</executions> </plugin> -->
 		</plugins>
 	</build>
 </project>
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/AnnotationBean.java b/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/AnnotationBean.java
index c4c5d048fa..8f54baacee 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/AnnotationBean.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/AnnotationBean.java
@@ -24,7 +24,9 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
+import org.springframework.aop.support.AopUtils;
 import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.BeanInitializationException;
 import org.springframework.beans.factory.DisposableBean;
 import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
 import org.springframework.beans.factory.config.BeanPostProcessor;
@@ -134,15 +136,19 @@ public Object postProcessAfterInitialization(Object bean, String beanName)
         if (! isMatchPackage(bean)) {
             return bean;
         }
-        Service service = bean.getClass().getAnnotation(Service.class);
+        Class<?> clazz = bean.getClass();
+        if(isProxyBean(bean)){
+            clazz = AopUtils.getTargetClass(bean);
+        }
+        Service service = clazz.getAnnotation(Service.class);
         if (service != null) {
             ServiceBean<Object> serviceConfig = new ServiceBean<Object>(service);
             if (void.class.equals(service.interfaceClass())
                     && "".equals(service.interfaceName())) {
-                if (bean.getClass().getInterfaces().length > 0) {
-                    serviceConfig.setInterface(bean.getClass().getInterfaces()[0]);
+                if (clazz.getInterfaces().length > 0) {
+                    serviceConfig.setInterface(clazz.getInterfaces()[0]);
                 } else {
-                    throw new IllegalStateException("Failed to export remote service class " + bean.getClass().getName() + ", cause: The @Service undefined interfaceClass or interfaceName, and the service class unimplemented any interfaces.");
+                    throw new IllegalStateException("Failed to export remote service class " + clazz.getName() + ", cause: The @Service undefined interfaceClass or interfaceName, and the service class unimplemented any interfaces.");
                 }
             }
             if (applicationContext != null) {
@@ -175,7 +181,8 @@ public Object postProcessAfterInitialization(Object bean, String beanName)
                 }
                 if (service.protocol() != null && service.protocol().length > 0) {
                     List<ProtocolConfig> protocolConfigs = new ArrayList<ProtocolConfig>();
-                    for (String protocolId : service.registry()) {
+                    // modified by lishen; fix dubbo's bug
+                    for (String protocolId : service.protocol()) {
                         if (protocolId != null && protocolId.length() > 0) {
                             protocolConfigs.add((ProtocolConfig)applicationContext.getBean(protocolId, ProtocolConfig.class));
                         }
@@ -202,7 +209,11 @@ public Object postProcessBeforeInitialization(Object bean, String beanName)
         if (! isMatchPackage(bean)) {
             return bean;
         }
-        Method[] methods = bean.getClass().getMethods();
+        Class<?> clazz = bean.getClass();
+        if(isProxyBean(bean)){
+            clazz = AopUtils.getTargetClass(bean);
+        }
+        Method[] methods = clazz.getMethods();
         for (Method method : methods) {
             String name = method.getName();
             if (name.length() > 3 && name.startsWith("set")
@@ -214,15 +225,17 @@ public Object postProcessBeforeInitialization(Object bean, String beanName)
                 	if (reference != null) {
 	                	Object value = refer(reference, method.getParameterTypes()[0]);
 	                	if (value != null) {
-	                		method.invoke(bean, new Object[] {  });
+	                		method.invoke(bean, new Object[] { value });
 	                	}
                 	}
-                } catch (Throwable e) {
-                    logger.error("Failed to init remote service reference at method " + name + " in class " + bean.getClass().getName() + ", cause: " + e.getMessage(), e);
+                } catch (Exception e) {
+                    // modified by lishen
+                    throw new BeanInitializationException("Failed to init remote service reference at method " + name + " in class " + bean.getClass().getName(), e);
+//                    logger.error("Failed to init remote service reference at method " + name + " in class " + bean.getClass().getName() + ", cause: " + e.getMessage(), e);
                 }
             }
         }
-        Field[] fields = bean.getClass().getDeclaredFields();
+        Field[] fields = clazz.getDeclaredFields();
         for (Field field : fields) {
             try {
                 if (! field.isAccessible()) {
@@ -235,8 +248,10 @@ public Object postProcessBeforeInitialization(Object bean, String beanName)
 	                	field.set(bean, value);
 	                }
             	}
-            } catch (Throwable e) {
-            	logger.error("Failed to init remote service reference at filed " + field.getName() + " in class " + bean.getClass().getName() + ", cause: " + e.getMessage(), e);
+            } catch (Exception e) {
+                // modified by lishen
+                throw new BeanInitializationException("Failed to init remote service reference at filed " + field.getName() + " in class " + bean.getClass().getName(), e);
+//            	logger.error("Failed to init remote service reference at filed " + field.getName() + " in class " + bean.getClass().getName() + ", cause: " + e.getMessage(), e);
             }
         }
         return bean;
@@ -306,7 +321,11 @@ private boolean isMatchPackage(Object bean) {
         if (annotationPackages == null || annotationPackages.length == 0) {
             return true;
         }
-        String beanClassName = bean.getClass().getName();
+        Class clazz = bean.getClass();
+        if(isProxyBean(bean)){
+            clazz = AopUtils.getTargetClass(bean);
+        }
+        String beanClassName = clazz.getName();
         for (String pkg : annotationPackages) {
             if (beanClassName.startsWith(pkg)) {
                 return true;
@@ -315,4 +334,8 @@ private boolean isMatchPackage(Object bean) {
         return false;
     }
 
+    private boolean isProxyBean(Object bean) {
+        return AopUtils.isAopProxy(bean);
+    }
+
 }
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/ServiceBean.java b/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/ServiceBean.java
index 0f3ff57196..cc9c2a0776 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/ServiceBean.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/com/alibaba/dubbo/config/spring/ServiceBean.java
@@ -20,6 +20,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.springframework.aop.support.AopUtils;
 import org.springframework.beans.factory.BeanFactoryUtils;
 import org.springframework.beans.factory.BeanNameAware;
 import org.springframework.beans.factory.DisposableBean;
@@ -255,4 +256,12 @@ public void destroy() throws Exception {
         unexport();
     }
 
+    // added by lishen
+    @Override
+    protected Class getServiceClass(T ref) {
+        if (AopUtils.isAopProxy(ref)) {
+            return AopUtils.getTargetClass(ref);
+        }
+        return super.getServiceClass(ref);
+    }
 }
\ No newline at end of file
diff --git a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
index 65df01c96f..d0168856cd 100644
--- a/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
+++ b/dubbo-config/dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd
@@ -778,6 +778,28 @@
 				<xsd:documentation><![CDATA[ The protocol serialization. ]]></xsd:documentation>
 			</xsd:annotation>
 		</xsd:attribute>
+        <!--TODO change it to keep-alive in the future-->
+        <xsd:attribute name="keepalive" type="xsd:boolean" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The protocol keepAlive. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <!-- TODO change to a better name -->
+        <xsd:attribute name="optimizer" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The serialization optimizer. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <xsd:attribute name="extension" type="xsd:string" use="optional">
+            <xsd:annotation>
+                <xsd:documentation><![CDATA[ The extension for protocol. ]]></xsd:documentation>
+            </xsd:annotation>
+        </xsd:attribute>
+        <!--<xsd:attribute name="filter" type="xsd:string" use="optional">-->
+            <!--<xsd:annotation>-->
+                <!--<xsd:documentation><![CDATA[ The filter for protocol. ]]></xsd:documentation>-->
+            <!--</xsd:annotation>-->
+        <!--</xsd:attribute>-->
 		<xsd:attribute name="charset" type="xsd:string" use="optional">
 			<xsd:annotation>
 				<xsd:documentation><![CDATA[ The protocol charset. ]]></xsd:documentation>
diff --git a/dubbo-config/pom.xml b/dubbo-config/pom.xml
index ed2a84959c..925195632b 100644
--- a/dubbo-config/pom.xml
+++ b/dubbo-config/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-config</artifactId>
 	<packaging>pom</packaging>
diff --git a/dubbo-container/dubbo-container-api/pom.xml b/dubbo-container/dubbo-container-api/pom.xml
index 342964ed50..3cb4bda94c 100644
--- a/dubbo-container/dubbo-container-api/pom.xml
+++ b/dubbo-container/dubbo-container-api/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-container</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-container-api</artifactId>
 	<packaging>jar</packaging>
@@ -37,11 +37,17 @@
 		<dependency>
 			<groupId>org.mortbay.jetty</groupId>
 			<artifactId>jetty</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
 		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-		</dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
 	</dependencies>
 	<build>
 		<plugins>
diff --git a/dubbo-container/dubbo-container-javaconfig/pom.xml b/dubbo-container/dubbo-container-javaconfig/pom.xml
new file mode 100644
index 0000000000..3cc3985b60
--- /dev/null
+++ b/dubbo-container/dubbo-container-javaconfig/pom.xml
@@ -0,0 +1,42 @@
+<!--
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>com.alibaba</groupId>
+    <artifactId>dubbo-container</artifactId>
+    <version>2.8.4</version>
+  </parent>
+  <artifactId>dubbo-container-javaconfig</artifactId>
+  <packaging>jar</packaging>
+  <name>${project.artifactId}</name>
+  <description>The spring container by java config module of dubbo project</description>
+  <properties>
+    <skip_maven_deploy>true</skip_maven_deploy>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>dubbo-container-api</artifactId>
+      <version>${project.parent.version}</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file
diff --git a/dubbo-container/dubbo-container-javaconfig/src/main/java/com/alibaba/dubbo/container/javaconfig/JavaConfigContainer.java b/dubbo-container/dubbo-container-javaconfig/src/main/java/com/alibaba/dubbo/container/javaconfig/JavaConfigContainer.java
new file mode 100644
index 0000000000..15b30a4d91
--- /dev/null
+++ b/dubbo-container/dubbo-container-javaconfig/src/main/java/com/alibaba/dubbo/container/javaconfig/JavaConfigContainer.java
@@ -0,0 +1,64 @@
+/**
+ * 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.container.javaconfig;
+
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.common.utils.ConfigUtils;
+import com.alibaba.dubbo.container.Container;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+
+/**
+ * JavaConfigContainer. (SPI, Singleton, ThreadSafe)
+ *
+ * @author Jinkai.Ma
+ */
+public class JavaConfigContainer implements Container {
+
+    private static final Logger logger = LoggerFactory.getLogger(JavaConfigContainer.class);
+
+    public static final String SPRING_JAVACONFIG = "dubbo.spring.javaconfig";
+
+    public static final String DEFAULT_SPRING_JAVACONFIG = "dubbo.spring.javaconfig";
+
+    static AnnotationConfigApplicationContext context;
+
+    public static AnnotationConfigApplicationContext getContext() {
+        return context;
+    }
+
+    public void start() {
+        String configPath = ConfigUtils.getProperty(SPRING_JAVACONFIG);
+        if (configPath == null || configPath.length() == 0) {
+            configPath = DEFAULT_SPRING_JAVACONFIG;
+        }
+        context = new AnnotationConfigApplicationContext(configPath);
+        context.start();
+    }
+
+    public void stop() {
+        try {
+            if (context != null) {
+                context.stop();
+                context.close();
+                context = null;
+            }
+        } catch (Throwable e) {
+            logger.error(e.getMessage(), e);
+        }
+    }
+
+}
diff --git a/dubbo-container/dubbo-container-javaconfig/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.Container b/dubbo-container/dubbo-container-javaconfig/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.Container
new file mode 100644
index 0000000000..c8d7f9f4f9
--- /dev/null
+++ b/dubbo-container/dubbo-container-javaconfig/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.container.Container
@@ -0,0 +1 @@
+javaconfig=com.alibaba.dubbo.container.javaconfig.JavaConfigContainer
\ No newline at end of file
diff --git a/dubbo-container/dubbo-container-javaconfig/src/test/java/com/alibaba/dubbo/container/javaconfig/JavaConfigContainerTest.java b/dubbo-container/dubbo-container-javaconfig/src/test/java/com/alibaba/dubbo/container/javaconfig/JavaConfigContainerTest.java
new file mode 100644
index 0000000000..cdf0d50dc7
--- /dev/null
+++ b/dubbo-container/dubbo-container-javaconfig/src/test/java/com/alibaba/dubbo/container/javaconfig/JavaConfigContainerTest.java
@@ -0,0 +1,36 @@
+/**
+ * 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.container.javaconfig;
+
+import com.alibaba.dubbo.common.extension.ExtensionLoader;
+import com.alibaba.dubbo.container.Container;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author Jinkai.Ma
+ */
+public class JavaConfigContainerTest {
+
+    @Test
+    public void testContainer() {
+        JavaConfigContainer container = (JavaConfigContainer) ExtensionLoader.getExtensionLoader(Container.class).getExtension("javaconfig");
+        container.start();
+        Assert.assertEquals(JavaConfigContainer.class, container.context.getBean("container").getClass());
+        container.stop();
+    }
+
+}
diff --git a/dubbo-container/dubbo-container-javaconfig/src/test/java/dubbo/spring/javaconfig/TestDubboConfig.java b/dubbo-container/dubbo-container-javaconfig/src/test/java/dubbo/spring/javaconfig/TestDubboConfig.java
new file mode 100644
index 0000000000..0afc4c98ce
--- /dev/null
+++ b/dubbo-container/dubbo-container-javaconfig/src/test/java/dubbo/spring/javaconfig/TestDubboConfig.java
@@ -0,0 +1,33 @@
+/**
+ * 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.container.javaconfig.JavaConfigContainer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author Jinkai.Ma
+ */
+@Configuration
+public class TestDubboConfig {
+
+    @Bean
+    public JavaConfigContainer container() {
+        return new JavaConfigContainer();
+    }
+
+}
diff --git a/dubbo-container/dubbo-container-javaconfig/src/test/resources/log4j.xml b/dubbo-container/dubbo-container-javaconfig/src/test/resources/log4j.xml
new file mode 100644
index 0000000000..210b467888
--- /dev/null
+++ b/dubbo-container/dubbo-container-javaconfig/src/test/resources/log4j.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n" />
+		</layout>
+	</appender>
+	<root>
+		<level value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file
diff --git a/dubbo-container/dubbo-container-jetty/pom.xml b/dubbo-container/dubbo-container-jetty/pom.xml
index 31811b18ed..3fd180fb91 100644
--- a/dubbo-container/dubbo-container-jetty/pom.xml
+++ b/dubbo-container/dubbo-container-jetty/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-container</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-container-jetty</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-container/dubbo-container-log4j/pom.xml b/dubbo-container/dubbo-container-log4j/pom.xml
index adea3aa7e9..be4637f326 100644
--- a/dubbo-container/dubbo-container-log4j/pom.xml
+++ b/dubbo-container/dubbo-container-log4j/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-container</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-container-log4j</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-container/dubbo-container-logback/pom.xml b/dubbo-container/dubbo-container-logback/pom.xml
index 20493bae53..a123294937 100644
--- a/dubbo-container/dubbo-container-logback/pom.xml
+++ b/dubbo-container/dubbo-container-logback/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-container</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-container-logback</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-container/dubbo-container-spring/pom.xml b/dubbo-container/dubbo-container-spring/pom.xml
index 30a7a299d6..9564561a89 100644
--- a/dubbo-container/dubbo-container-spring/pom.xml
+++ b/dubbo-container/dubbo-container-spring/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-container</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-container-spring</artifactId>
 	<packaging>jar</packaging>
@@ -29,6 +29,10 @@
 		<skip_maven_deploy>true</skip_maven_deploy>
 	</properties>
 	<dependencies>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+		</dependency>
 		<dependency>
 			<groupId>com.alibaba</groupId>
 			<artifactId>dubbo-container-api</artifactId>
diff --git a/dubbo-container/pom.xml b/dubbo-container/pom.xml
index b8738814cb..b277ac0076 100644
--- a/dubbo-container/pom.xml
+++ b/dubbo-container/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-container</artifactId>
 	<packaging>pom</packaging>
@@ -31,6 +31,7 @@
 	<modules>
 		<module>dubbo-container-api</module>
 		<module>dubbo-container-spring</module>
+		<module>dubbo-container-javaconfig</module>
 		<module>dubbo-container-jetty</module>
 		<module>dubbo-container-log4j</module>
 		<module>dubbo-container-logback</module>
diff --git a/dubbo-demo/dubbo-demo-api/pom.xml b/dubbo-demo/dubbo-demo-api/pom.xml
index 849c3e6532..a311efe313 100644
--- a/dubbo-demo/dubbo-demo-api/pom.xml
+++ b/dubbo-demo/dubbo-demo-api/pom.xml
@@ -14,18 +14,47 @@
  - limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>com.alibaba</groupId>
-		<artifactId>dubbo-demo</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
-	</parent>
-	<artifactId>dubbo-demo-api</artifactId>
-	<packaging>jar</packaging>
-	<name>${project.artifactId}</name>
-	<description>The demo module of dubbo project</description>
-	<properties>
-		<skip_maven_deploy>true</skip_maven_deploy>
-	</properties>
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-demo</artifactId>
+        <version>2.8.4</version>
+    </parent>
+    <artifactId>dubbo-demo-api</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>true</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.annotation</groupId>
+            <artifactId>javax.annotation-api</artifactId>
+            <version>1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+            <version>1.9.12</version>
+        </dependency>
+    </dependencies>
 </project>
\ 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
new file mode 100644
index 0000000000..881ba9b49b
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/SerializationOptimizerImpl.java
@@ -0,0 +1,49 @@
+/**
+ * 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<Class> getSerializableClasses() {
+        List<Class> classes = new LinkedList<Class>();
+        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
new file mode 100644
index 0000000000..905be3e4cf
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidRequest.java
@@ -0,0 +1,55 @@
+/**
+ * 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<Impression> 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<Impression> getImpressions() {
+        return impressions;
+    }
+
+    public void setImpressions(List<Impression> 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
new file mode 100644
index 0000000000..e5b26b425d
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidResponse.java
@@ -0,0 +1,44 @@
+/**
+ * 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<SeatBid> seatBids;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public List<SeatBid> getSeatBids() {
+        return seatBids;
+    }
+
+    public void setSeatBids(List<SeatBid> 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
new file mode 100644
index 0000000000..31ed65d0ad
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/BidService.java
@@ -0,0 +1,23 @@
+/**
+ * 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
new file mode 100644
index 0000000000..81dcab6960
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Device.java
@@ -0,0 +1,79 @@
+/**
+ * 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
new file mode 100644
index 0000000000..ddbe6b2e54
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Geo.java
@@ -0,0 +1,61 @@
+/**
+ * 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
new file mode 100644
index 0000000000..2b4cddfc55
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/Impression.java
@@ -0,0 +1,43 @@
+/**
+ * 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
new file mode 100644
index 0000000000..8e852e657b
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/bid/SeatBid.java
@@ -0,0 +1,44 @@
+/**
+ * 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
new file mode 100644
index 0000000000..8796e71b88
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/ClientTraceFilter.java
@@ -0,0 +1,36 @@
+/**
+ * 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
new file mode 100644
index 0000000000..82397901ab
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/CustomExceptionMapper.java
@@ -0,0 +1,34 @@
+/**
+ * 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<NotFoundException> {
+
+    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
new file mode 100644
index 0000000000..27e6521bd8
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceBinding.java
@@ -0,0 +1,30 @@
+/**
+ * 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
new file mode 100644
index 0000000000..f8b8203e01
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/DynamicTraceInterceptor.java
@@ -0,0 +1,42 @@
+/**
+ * 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
new file mode 100644
index 0000000000..9127700283
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceFilter.java
@@ -0,0 +1,39 @@
+/**
+ * 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
new file mode 100644
index 0000000000..f8c25fc585
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/extension/TraceInterceptor.java
@@ -0,0 +1,42 @@
+/**
+ * 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
new file mode 100644
index 0000000000..297e7915e2
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/hello/HelloService.java
@@ -0,0 +1,23 @@
+/**
+ * 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
new file mode 100644
index 0000000000..eb5a3b86f3
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/User.java
@@ -0,0 +1,77 @@
+/**
+ * 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
new file mode 100644
index 0000000000..74782f25c6
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/UserService.java
@@ -0,0 +1,25 @@
+/**
+ * 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
new file mode 100644
index 0000000000..91ab166133
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestService.java
@@ -0,0 +1,30 @@
+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
new file mode 100644
index 0000000000..1924ed0c80
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/RegistrationResult.java
@@ -0,0 +1,45 @@
+/**
+ * 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
new file mode 100644
index 0000000000..87f28fcd98
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestService.java
@@ -0,0 +1,40 @@
+/**
+ * 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-consumer/pom.xml b/dubbo-demo/dubbo-demo-consumer/pom.xml
index e518cff2c0..3e2427967b 100644
--- a/dubbo-demo/dubbo-demo-consumer/pom.xml
+++ b/dubbo-demo/dubbo-demo-consumer/pom.xml
@@ -14,172 +14,220 @@
  - limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>com.alibaba</groupId>
-		<artifactId>dubbo-demo</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
-	</parent>
-	<artifactId>dubbo-demo-consumer</artifactId>
-	<packaging>jar</packaging>
-	<name>${project.artifactId}</name>
-	<description>The demo consumer module of dubbo project</description>
-	<properties>
-		<skip_maven_deploy>false</skip_maven_deploy>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-demo-api</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.javassist</groupId>
-			<artifactId>javassist</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.jboss.netty</groupId>
-			<artifactId>netty</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.mina</groupId>
-			<artifactId>mina-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.glassfish.grizzly</groupId>
-			<artifactId>grizzly-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.httpcomponents</groupId>
-			<artifactId>httpclient</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>fastjson</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.thoughtworks.xstream</groupId>
-			<artifactId>xstream</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.bsf</groupId>
-			<artifactId>bsf-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.zookeeper</groupId>
-			<artifactId>zookeeper</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.github.sgroschupf</groupId>
-			<artifactId>zkclient</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.netflix.curator</groupId>
-			<artifactId>curator-framework</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.googlecode.xmemcached</groupId>
-			<artifactId>xmemcached</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.cxf</groupId>
-			<artifactId>cxf-rt-frontend-simple</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.cxf</groupId>
-			<artifactId>cxf-rt-transports-http</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.thrift</groupId>
-			<artifactId>libthrift</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.caucho</groupId>
-			<artifactId>hessian</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.mortbay.jetty</groupId>
-			<artifactId>jetty</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>redis.clients</groupId>
-			<artifactId>jedis</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.validation</groupId>
-			<artifactId>validation-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-validator</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.cache</groupId>
-			<artifactId>cache-api</artifactId>
-		</dependency>
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack</id>
-						<phase>package</phase>
-						<goals>
-							<goal>unpack</goal>
-						</goals>
-						<configuration>
-							<artifactItems>
-								<artifactItem>
-									<groupId>com.alibaba</groupId>
-									<artifactId>dubbo</artifactId>
-									<version>${project.parent.version}</version>
-									<outputDirectory>${project.build.directory}/dubbo</outputDirectory>
-									<includes>META-INF/assembly/**</includes>
-								</artifactItem>
-							</artifactItems>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<artifactId>maven-assembly-plugin</artifactId>
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-demo</artifactId>
+        <version>2.8.4</version>
+    </parent>
+    <artifactId>dubbo-demo-consumer</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo consumer module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-demo-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-netty</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jdk-http</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jackson-provider</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxb-provider</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-juli</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.esotericsoftware.kryo</groupId>
+            <artifactId>kryo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>de.javakaffee</groupId>
+            <artifactId>kryo-serializers</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>de.ruedigermoeller</groupId>
+            <artifactId>fst</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.alibaba</groupId>
+                                    <artifactId>dubbo</artifactId>
+                                    <version>${project.parent.version}</version>
+                                    <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
+                                    <includes>META-INF/assembly/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
                 <configuration>
                     <descriptor>src/main/assembly/assembly.xml</descriptor>
                 </configuration>
                 <executions>
-					<execution>
-						<id>make-assembly</id>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-					</execution>
-				</executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
-		</plugins>
-	</build>
+        </plugins>
+    </build>
 </project>
\ 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
index 5258feb6e7..b6138e729a 100644
--- 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
@@ -15,29 +15,75 @@
  */
 package com.alibaba.dubbo.demo.consumer;
 
-import java.text.SimpleDateFormat;
-import java.util.Date;
+import java.util.ArrayList;
+import java.util.List;
 
-import com.alibaba.dubbo.demo.DemoService;
+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 DemoService demoService;
 
-    public void setDemoService(DemoService demoService) {
-        this.demoService = demoService;
+    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 {
-        for (int i = 0; i < Integer.MAX_VALUE; i ++) {
-            try {
-            	String hello = demoService.sayHello("world" + i);
-                System.out.println("[" + new SimpleDateFormat("HH:mm:ss").format(new Date()) + "] " + hello);
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-            Thread.sleep(2000);
+    public void start() throws Exception {
+        BidRequest request = new BidRequest();
+
+        Impression imp = new Impression();
+        imp.setBidFloor(1.1);
+        imp.setId("abc");
+        List<Impression> imps = new ArrayList<Impression>(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
new file mode 100644
index 0000000000..636aba1742
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/main/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigAction.java
@@ -0,0 +1,87 @@
+/*
+ * 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<Impression> imps = new ArrayList<Impression>(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
new file mode 100644
index 0000000000..ea27c40392
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoActionConfig.java
@@ -0,0 +1,33 @@
+/*
+ * 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
new file mode 100644
index 0000000000..2052150a92
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/main/java/dubbo/spring/javaconfig/DubboDemoConsumerConfig.java
@@ -0,0 +1,56 @@
+/*
+ * 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
index 365bafb80a..fb7662ca00 100644
--- 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
@@ -20,8 +20,9 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
 
-	<bean class="com.alibaba.dubbo.demo.consumer.DemoAction" init-method="start">
-		<property name="demoService" ref="demoService" />
+    <bean class="com.alibaba.dubbo.demo.consumer.DemoAction" init-method="start">
+		<property name="bidService" ref="bidService" />
+		<property name="anotherUserRestService" ref="anotherUserRestService" />
 	</bean>
 
 </beans>
\ 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
index 981599fb17..6dd555c68f 100644
--- 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
@@ -1,25 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
- - 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.
--->
 <beans xmlns="http://www.springframework.org/schema/beans"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
 	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
 
-	<dubbo:reference id="demoService" interface="com.alibaba.dubbo.demo.DemoService" />
+    <dubbo:application name="demo-consumer" owner="programmer" organization="dubbox"/>
+
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+
+    <!--uncomment this if you want to test dubbo's monitor-->
+    <!--<dubbo:monitor protocol="registry"/>-->
+
+    <dubbo:reference id="bidService" interface="com.alibaba.dubbo.demo.bid.BidService"/>
+    <dubbo:reference id="anotherUserRestService" interface="com.alibaba.dubbo.demo.user.facade.AnotherUserRestService"/>
+
+    <!-- directly connect to provider to simulate the access to non-dubbo rest services -->
+    <!--<dubbo:reference id="anotherUserRestService" interface="com.alibaba.dubbo.demo.user.facade.AnotherUserRestService" url="rest://localhost:8888/services/"/>-->
 
 </beans>
\ 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
new file mode 100644
index 0000000000..afbe070439
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/DemoJavaConfigConsumer.java
@@ -0,0 +1,27 @@
+/*
+ * 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
new file mode 100644
index 0000000000..b8fd5fddba
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-consumer/src/test/java/com/alibaba/dubbo/demo/consumer/RestClient.java
@@ -0,0 +1,104 @@
+/**
+ * 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/pom.xml b/dubbo-demo/dubbo-demo-provider/pom.xml
index c7970f1239..1d6192f7ae 100644
--- a/dubbo-demo/dubbo-demo-provider/pom.xml
+++ b/dubbo-demo/dubbo-demo-provider/pom.xml
@@ -14,172 +14,226 @@
  - limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>com.alibaba</groupId>
-		<artifactId>dubbo-demo</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
-	</parent>
-	<artifactId>dubbo-demo-provider</artifactId>
-	<packaging>jar</packaging>
-	<name>${project.artifactId}</name>
-	<description>The demo provider module of dubbo project</description>
-	<properties>
-		<skip_maven_deploy>false</skip_maven_deploy>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-demo-api</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.javassist</groupId>
-			<artifactId>javassist</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.jboss.netty</groupId>
-			<artifactId>netty</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.mina</groupId>
-			<artifactId>mina-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.glassfish.grizzly</groupId>
-			<artifactId>grizzly-core</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.httpcomponents</groupId>
-			<artifactId>httpclient</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>fastjson</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.thoughtworks.xstream</groupId>
-			<artifactId>xstream</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.bsf</groupId>
-			<artifactId>bsf-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.zookeeper</groupId>
-			<artifactId>zookeeper</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.github.sgroschupf</groupId>
-			<artifactId>zkclient</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.netflix.curator</groupId>
-			<artifactId>curator-framework</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.googlecode.xmemcached</groupId>
-			<artifactId>xmemcached</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.cxf</groupId>
-			<artifactId>cxf-rt-frontend-simple</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.cxf</groupId>
-			<artifactId>cxf-rt-transports-http</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.thrift</groupId>
-			<artifactId>libthrift</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>com.caucho</groupId>
-			<artifactId>hessian</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.mortbay.jetty</groupId>
-			<artifactId>jetty</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>log4j</groupId>
-			<artifactId>log4j</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>redis.clients</groupId>
-			<artifactId>jedis</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.validation</groupId>
-			<artifactId>validation-api</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.hibernate</groupId>
-			<artifactId>hibernate-validator</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>javax.cache</groupId>
-			<artifactId>cache-api</artifactId>
-		</dependency>
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-dependency-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>unpack</id>
-						<phase>package</phase>
-						<goals>
-							<goal>unpack</goal>
-						</goals>
-						<configuration>
-							<artifactItems>
-								<artifactItem>
-									<groupId>com.alibaba</groupId>
-									<artifactId>dubbo</artifactId>
-									<version>${project.parent.version}</version>
-									<outputDirectory>${project.build.directory}/dubbo</outputDirectory>
-									<includes>META-INF/assembly/**</includes>
-								</artifactItem>
-							</artifactItems>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptor>src/main/assembly/assembly.xml</descriptor>
-                </configuration>
-                <executions>
-					<execution>
-						<id>make-assembly</id>
-						<phase>package</phase>
-						<goals>
-							<goal>single</goal>
-						</goals>
-					</execution>
-				</executions>
-            </plugin>
-		</plugins>
-	</build>
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-demo</artifactId>
+        <version>2.8.4</version>
+    </parent>
+    <artifactId>dubbo-demo-provider</artifactId>
+    <packaging>war</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo provider module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-demo-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-netty</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jdk-http</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jackson-provider</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxb-provider</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-juli</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.esotericsoftware.kryo</groupId>
+            <artifactId>kryo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>de.javakaffee</groupId>
+            <artifactId>kryo-serializers</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>de.ruedigermoeller</groupId>
+            <artifactId>fst</artifactId>
+        </dependency>
+    </dependencies>
+    <!--<build>-->
+    <!--<plugins>-->
+    <!--<plugin>-->
+    <!--<artifactId>maven-dependency-plugin</artifactId>-->
+    <!--<executions>-->
+    <!--<execution>-->
+    <!--<id>unpack</id>-->
+    <!--<phase>package</phase>-->
+    <!--<goals>-->
+    <!--<goal>unpack</goal>-->
+    <!--</goals>-->
+    <!--<configuration>-->
+    <!--<artifactItems>-->
+    <!--<artifactItem>-->
+    <!--<groupId>com.alibaba</groupId>-->
+    <!--<artifactId>dubbo</artifactId>-->
+    <!--<version>${project.parent.version}</version>-->
+    <!--<outputDirectory>${project.build.directory}/dubbo</outputDirectory>-->
+    <!--<includes>META-INF/assembly/**</includes>-->
+    <!--</artifactItem>-->
+    <!--</artifactItems>-->
+    <!--</configuration>-->
+    <!--</execution>-->
+    <!--</executions>-->
+    <!--</plugin>-->
+    <!--<plugin>-->
+    <!--<artifactId>maven-assembly-plugin</artifactId>-->
+    <!--<configuration>-->
+    <!--<descriptor>src/main/assembly/assembly.xml</descriptor>-->
+    <!--</configuration>-->
+    <!--<executions>-->
+    <!--<execution>-->
+    <!--<id>make-assembly</id>-->
+    <!--<phase>package</phase>-->
+    <!--<goals>-->
+    <!--<goal>single</goal>-->
+    <!--</goals>-->
+    <!--</execution>-->
+    <!--</executions>-->
+    <!--</plugin>-->
+    <!--</plugins>-->
+    <!--</build>-->
 </project>
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties b/dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties
deleted file mode 100644
index 728be32db5..0000000000
--- a/dubbo-demo/dubbo-demo-provider/src/main/assembly/conf/dubbo.properties
+++ /dev/null
@@ -1,28 +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-provider
-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.protocol.name=dubbo
-dubbo.protocol.port=20880
-dubbo.service.loadbalance=roundrobin
-dubbo.log4j.file=logs/dubbo-demo-provider.log
-dubbo.log4j.level=WARN
\ No newline at end of file
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
new file mode 100644
index 0000000000..391ffbc3a8
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/bid/BidServiceImpl.java
@@ -0,0 +1,43 @@
+/**
+ * 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<SeatBid> seatBids = new ArrayList<SeatBid>(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
new file mode 100644
index 0000000000..80fcf24fc5
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/hello/HelloServiceImpl.java
@@ -0,0 +1,26 @@
+/**
+ * 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
new file mode 100644
index 0000000000..e722a01573
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/UserServiceImpl.java
@@ -0,0 +1,36 @@
+/**
+ * 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
new file mode 100644
index 0000000000..e7dd278dac
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnnotationDrivenUserRestServiceImpl.java
@@ -0,0 +1,64 @@
+/**
+ * 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
new file mode 100644
index 0000000000..23a1ba282e
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/AnotherUserRestServiceImpl.java
@@ -0,0 +1,42 @@
+/**
+ * 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
new file mode 100644
index 0000000000..659a820351
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/user/facade/UserRestServiceImpl.java
@@ -0,0 +1,71 @@
+/**
+ * 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/resources/META-INF/spring/dubbo-demo-provider.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/META-INF/spring/dubbo-demo-provider.xml
index ea8026b6ed..265645ab00 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/dubbo-demo-provider.xml
@@ -19,9 +19,66 @@
 	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
 	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
-	
-	<bean id="demoService" class="com.alibaba.dubbo.demo.provider.DemoServiceImpl" />
-	
-	<dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoService" />
-	
+
+    <dubbo:application name="demo-provider" owner="programmer" organization="dubbox"/>
+
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+
+    <!--uncomment this if you want to test dubbo's monitor-->
+    <!--<dubbo:monitor protocol="registry"/>-->
+
+    <!-- here we demonstrate both annotation-based and xml-based configs -->
+    <dubbo:annotation package="com.alibaba.dubbo.demo.user.facade" />
+
+    <dubbo:protocol name="dubbo" serialization="kryo" optimizer="com.alibaba.dubbo.demo.SerializationOptimizerImpl"/>
+    <!--<dubbo:protocol name="dubbo" serialization="fst" optimizer="com.alibaba.dubbo.demo.SerializationOptimizerImpl"/>-->
+
+    <!--<dubbo:protocol name="dubbo" serialization="nativejava"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="hessian2"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="fastjson"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="dubbo"/>-->
+
+
+    <!--TODO according to the spring convention, we should use something like keep-alive-->
+    <!-- use netty server -->
+    <!--<dubbo:protocol name="rest" port="8888" keepalive="true" server="netty" iothreads="5" threads="100" contextpath="services"/>-->
+
+    <!-- use tjws server -->
+    <!--<dubbo:protocol name="rest" port="8888" server="tjws" contextpath="services"/>-->
+
+    <!-- use tomcat server -->
+    <dubbo:protocol name="rest" port="8888" threads="500" contextpath="services" server="tomcat" accepts="500"
+                    extension="com.alibaba.dubbo.demo.extension.TraceInterceptor,
+                    com.alibaba.dubbo.demo.extension.TraceFilter,
+                    com.alibaba.dubbo.demo.extension.ClientTraceFilter,
+                    com.alibaba.dubbo.demo.extension.DynamicTraceBinding,
+                    com.alibaba.dubbo.demo.extension.CustomExceptionMapper,
+                    com.alibaba.dubbo.rpc.protocol.rest.support.LoggingFilter"/>
+
+    <!-- use the external tomcat or other server with the servlet approach; the port and contextpath must be exactly the same as those in external server -->
+    <!--<dubbo:protocol name="rest" port="8888" contextpath="services" server="servlet"/>-->
+
+    <dubbo:protocol name="http" port="8889"/>
+    <dubbo:protocol name="hessian" port="8890"/>
+    <dubbo:protocol name="webservice" port="8892"/>
+
+	<dubbo:service interface="com.alibaba.dubbo.demo.bid.BidService" ref="bidService"  protocol="dubbo"/>
+
+    <!-- we add the group property since there's another annotation-configured service impl: com.alibaba.dubbo.demo.user.facade.AnnotationDrivenUserRestServiceImpl -->
+    <dubbo:service interface="com.alibaba.dubbo.demo.user.UserService" ref="userService"  protocol="dubbo" group="xmlConfig"/>
+
+	<dubbo:service interface="com.alibaba.dubbo.demo.user.facade.UserRestService" ref="userRestService"  protocol="rest" validation="true"/>
+	<dubbo:service interface="com.alibaba.dubbo.demo.user.facade.AnotherUserRestService" ref="anotherUserRestService"  protocol="rest"  timeout="2000" connections="100" validation="true"/>
+
+    <bean id="bidService" class="com.alibaba.dubbo.demo.bid.BidServiceImpl" />
+
+    <bean id="userService" class="com.alibaba.dubbo.demo.user.UserServiceImpl" />
+
+    <bean id="userRestService" class="com.alibaba.dubbo.demo.user.facade.UserRestServiceImpl">
+        <property name="userService" ref="userService"/>
+    </bean>
+
+    <bean id="anotherUserRestService" class="com.alibaba.dubbo.demo.user.facade.AnotherUserRestServiceImpl">
+        <property name="userService" ref="userService"/>
+    </bean>
 </beans>
\ No newline at end of file
diff --git a/dubbo-demo/dubbo-demo-provider/src/test/resources/log4j.xml b/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.xml
similarity index 95%
rename from dubbo-demo/dubbo-demo-provider/src/test/resources/log4j.xml
rename to dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.xml
index 7d71634640..ae988c35f1 100644
--- a/dubbo-demo/dubbo-demo-provider/src/test/resources/log4j.xml
+++ b/dubbo-demo/dubbo-demo-provider/src/main/resources/log4j.xml
@@ -1,28 +1,28 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- - 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.
--->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-		<layout class="org.apache.log4j.PatternLayout">
-			<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n" />
-		</layout>
-	</appender>
-	<root>
-		<level value="INFO" />
-		<appender-ref ref="CONSOLE" />
-	</root>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n" />
+		</layout>
+	</appender>
+	<root>
+		<level value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
 </log4j:configuration>
\ 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
new file mode 100644
index 0000000000..9a355c15ff
--- /dev/null
+++ b/dubbo-demo/dubbo-demo-provider/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>/WEB-INF/classes/META-INF/spring/dubbo-demo-provider.xml</param-value>
+    </context-param>
+
+    <!--this listener must be defined before the spring listener-->
+    <listener>
+        <listener-class>com.alibaba.dubbo.remoting.http.servlet.BootstrapListener</listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+</web-app>
\ 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
index 31850ef4bf..b00688c9ef 100644
--- 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
@@ -15,10 +15,22 @@
  */
 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/dubbo-demo-provider/src/test/resources/dubbo.properties b/dubbo-demo/dubbo-demo-provider/src/test/resources/dubbo.properties
deleted file mode 100644
index 600d6089ad..0000000000
--- a/dubbo-demo/dubbo-demo-provider/src/test/resources/dubbo.properties
+++ /dev/null
@@ -1,28 +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-provider
-dubbo.application.owner=william
-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.protocol.name=dubbo
-dubbo.protocol.port=20880
-dubbo.service.loadbalance=roundrobin
-#dubbo.log4j.file=logs/dubbo-demo-consumer.log
-#dubbo.log4j.level=WARN
\ No newline at end of file
diff --git a/dubbo-demo/pom.xml b/dubbo-demo/pom.xml
index 05b065c721..4d77e14ec9 100644
--- a/dubbo-demo/pom.xml
+++ b/dubbo-demo/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-demo</artifactId>
 	<packaging>pom</packaging>
diff --git a/dubbo-filter/dubbo-filter-cache/pom.xml b/dubbo-filter/dubbo-filter-cache/pom.xml
index c5fb695316..8431bef623 100644
--- a/dubbo-filter/dubbo-filter-cache/pom.xml
+++ b/dubbo-filter/dubbo-filter-cache/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-filter</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-filter-cache</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-filter/dubbo-filter-validation/pom.xml b/dubbo-filter/dubbo-filter-validation/pom.xml
index 43af382509..d3d9cc1213 100644
--- a/dubbo-filter/dubbo-filter-validation/pom.xml
+++ b/dubbo-filter/dubbo-filter-validation/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-filter</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-filter-validation</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-filter/pom.xml b/dubbo-filter/pom.xml
index 8a50206a4d..86e2ef12fb 100644
--- a/dubbo-filter/pom.xml
+++ b/dubbo-filter/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-filter</artifactId>
 	<packaging>pom</packaging>
diff --git a/dubbo-maven/pom.xml b/dubbo-maven/pom.xml
index 3df8cb6e8f..68893fdf6c 100644
--- a/dubbo-maven/pom.xml
+++ b/dubbo-maven/pom.xml
@@ -53,7 +53,7 @@
 			<version>3.15.0-GA</version>
 		</dependency>
 		<dependency>
-			<groupId>org.jboss.netty</groupId>
+			<groupId>io.netty</groupId>
 			<artifactId>netty</artifactId>
 			<version>3.2.5.Final</version>
 		</dependency>
@@ -143,7 +143,7 @@
 		</dependency>
 		<dependency>
 			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
+			<artifactId>javax.servlet-api</artifactId>
 			<version>2.5</version>
 			<scope>provided</scope>
 		</dependency>
diff --git a/dubbo-monitor/dubbo-monitor-api/pom.xml b/dubbo-monitor/dubbo-monitor-api/pom.xml
index 19df1ae264..e654f038a5 100644
--- a/dubbo-monitor/dubbo-monitor-api/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-api/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-monitor</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-monitor-api</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-monitor/dubbo-monitor-default/pom.xml b/dubbo-monitor/dubbo-monitor-default/pom.xml
index a4e398bcd3..957fda3e42 100644
--- a/dubbo-monitor/dubbo-monitor-default/pom.xml
+++ b/dubbo-monitor/dubbo-monitor-default/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-monitor</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-monitor-default</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-monitor/pom.xml b/dubbo-monitor/pom.xml
index a5c516f6ae..5061c3f560 100644
--- a/dubbo-monitor/pom.xml
+++ b/dubbo-monitor/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-monitor</artifactId>
 	<packaging>pom</packaging>
diff --git a/dubbo-registry/dubbo-registry-api/pom.xml b/dubbo-registry/dubbo-registry-api/pom.xml
index 21e51e1df3..25572a8b65 100644
--- a/dubbo-registry/dubbo-registry-api/pom.xml
+++ b/dubbo-registry/dubbo-registry-api/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-registry</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-registry-api</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-registry/dubbo-registry-default/pom.xml b/dubbo-registry/dubbo-registry-default/pom.xml
index 616cd82a01..2ee2515bed 100644
--- a/dubbo-registry/dubbo-registry-default/pom.xml
+++ b/dubbo-registry/dubbo-registry-default/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-registry</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-registry-default</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-registry/dubbo-registry-multicast/pom.xml b/dubbo-registry/dubbo-registry-multicast/pom.xml
index 31f9e46bf7..478d4fb67b 100644
--- a/dubbo-registry/dubbo-registry-multicast/pom.xml
+++ b/dubbo-registry/dubbo-registry-multicast/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-registry</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-registry-multicast</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-registry/dubbo-registry-redis/pom.xml b/dubbo-registry/dubbo-registry-redis/pom.xml
index 89480310c5..10c9fa26b4 100644
--- a/dubbo-registry/dubbo-registry-redis/pom.xml
+++ b/dubbo-registry/dubbo-registry-redis/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-registry</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-registry-redis</artifactId>
 	<packaging>jar</packaging>
@@ -39,5 +39,9 @@
 			<artifactId>jedis</artifactId>
 			<scope>provided</scope>
 		</dependency>
+		<dependency>
+			<groupId>commons-pool</groupId>
+			<artifactId>commons-pool</artifactId>
+		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-registry/dubbo-registry-zookeeper/pom.xml b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
index b42217d30c..774d0b73bd 100644
--- a/dubbo-registry/dubbo-registry-zookeeper/pom.xml
+++ b/dubbo-registry/dubbo-registry-zookeeper/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-registry</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-registry-zookeeper</artifactId>
 	<packaging>jar</packaging>
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 3f62da2080..1a39435f96 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
@@ -262,7 +262,7 @@ private String toUrlPath(URL url) {
 
     private List<URL> toUrlsWithEmpty(URL consumer, String path, List<String> providers) {
         List<URL> urls = toUrlsWithoutEmpty(consumer, providers);
-        if (urls == null || urls.isEmpty()) {
+        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);
diff --git a/dubbo-registry/pom.xml b/dubbo-registry/pom.xml
index 47161e2cfc..4dedf4fc73 100644
--- a/dubbo-registry/pom.xml
+++ b/dubbo-registry/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-registry</artifactId>
 	<packaging>pom</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-api/pom.xml b/dubbo-remoting/dubbo-remoting-api/pom.xml
index 3c3195105e..c8fe146003 100644
--- a/dubbo-remoting/dubbo-remoting-api/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-api/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-remoting</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting-api</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java
index a0b8c82ddc..e2db42b06f 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/codec/ExchangeCodec.java
@@ -22,6 +22,7 @@
 import com.alibaba.dubbo.common.io.StreamUtils;
 import com.alibaba.dubbo.common.logger.Logger;
 import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.common.serialize.Cleanable;
 import com.alibaba.dubbo.common.serialize.ObjectInput;
 import com.alibaba.dubbo.common.serialize.ObjectOutput;
 import com.alibaba.dubbo.common.serialize.Serialization;
@@ -78,6 +79,13 @@ public void encode(Channel channel, ChannelBuffer buffer, Object msg) throws IOE
         } else {
             super.encode(channel, buffer, msg);
         }
+
+        // TODO modified by lishen
+//        System.out.println(">>>>>>>>>>>>>>>>>>>>>> the resulting byte size of encoding is " + buffer.readableBytes());
+        if (logger.isTraceEnabled()) {
+            logger.trace("the resulting byte size of encoding is " + buffer.readableBytes());
+        }
+
     }
 
     public Object decode(Channel channel, ChannelBuffer buffer) throws IOException {
@@ -230,12 +238,20 @@ protected void encodeRequest(Channel channel, ChannelBuffer buffer, Request req)
         buffer.writerIndex(savedWriteIndex + HEADER_LENGTH);
         ChannelBufferOutputStream bos = new ChannelBufferOutputStream(buffer);
         ObjectOutput out = serialization.serialize(channel.getUrl(), bos);
-        if (req.isEvent()) {
-            encodeEventData(channel, out, req.getData());
-        } else {
-            encodeRequestData(channel, out, req.getData());
+        try {
+            if (req.isEvent()) {
+                encodeEventData(channel, out, req.getData());
+            } else {
+                encodeRequestData(channel, out, req.getData());
+            }
+            out.flushBuffer();
+        } finally {
+            // modified by lishen
+            if (out instanceof Cleanable) {
+                ((Cleanable) out).cleanup();
+            }
         }
-        out.flushBuffer();
+
         bos.flush();
         bos.close();
         int len = bos.writtenBytes();
@@ -268,16 +284,24 @@ protected void encodeResponse(Channel channel, ChannelBuffer buffer, Response re
             buffer.writerIndex(savedWriteIndex + HEADER_LENGTH);
             ChannelBufferOutputStream bos = new ChannelBufferOutputStream(buffer);
             ObjectOutput out = serialization.serialize(channel.getUrl(), bos);
-            // encode response data or error message.
-            if (status == Response.OK) {
-                if (res.isHeartbeat()) {
-                    encodeHeartbeatData(channel, out, res.getResult());
-                } else {
-                    encodeResponseData(channel, out, res.getResult());
+            try {
+                // encode response data or error message.
+                if (status == Response.OK) {
+                    if (res.isHeartbeat()) {
+                        encodeHeartbeatData(channel, out, res.getResult());
+                    } else {
+                        encodeResponseData(channel, out, res.getResult());
+                    }
+                }
+                else out.writeUTF(res.getErrorMessage());
+                out.flushBuffer();
+            } finally {
+                // modified by lishen
+                if (out instanceof Cleanable) {
+                    ((Cleanable) out).cleanup();
                 }
             }
-            else out.writeUTF(res.getErrorMessage());
-            out.flushBuffer();
+
             bos.flush();
             bos.close();
 
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/AbstractServer.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/AbstractServer.java
index 7ab2871c2e..3788994f2c 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/AbstractServer.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/AbstractServer.java
@@ -1,36 +1,37 @@
-/*
- * 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.remoting.transport;
 
-import java.net.InetSocketAddress;
-import java.util.Collection;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ThreadPoolExecutor;
-
-import com.alibaba.dubbo.common.Constants;
-import com.alibaba.dubbo.common.URL;
-import com.alibaba.dubbo.common.logger.Logger;
-import com.alibaba.dubbo.common.logger.LoggerFactory;
-import com.alibaba.dubbo.common.utils.ExecutorUtil;
-import com.alibaba.dubbo.common.utils.NetUtils;
-import com.alibaba.dubbo.remoting.Channel;
-import com.alibaba.dubbo.remoting.ChannelHandler;
-import com.alibaba.dubbo.remoting.RemotingException;
-import com.alibaba.dubbo.remoting.Server;
-import com.alibaba.dubbo.remoting.transport.dispatcher.WrappedChannelHandler;
+import java.net.InetSocketAddress;
+import java.util.Collection;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.ThreadPoolExecutor;
+
+import com.alibaba.dubbo.common.Constants;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.extension.ExtensionLoader;
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.common.store.DataStore;
+import com.alibaba.dubbo.common.utils.ExecutorUtil;
+import com.alibaba.dubbo.common.utils.NetUtils;
+import com.alibaba.dubbo.remoting.Channel;
+import com.alibaba.dubbo.remoting.ChannelHandler;
+import com.alibaba.dubbo.remoting.RemotingException;
+import com.alibaba.dubbo.remoting.Server;
 
 /**
  * AbstractServer
@@ -38,9 +39,9 @@
  * @author qian.lei
  * @author ding.lid
  */
-public abstract class AbstractServer extends AbstractEndpoint implements Server {
-    
-    private static final Logger logger = LoggerFactory.getLogger(AbstractServer.class);
+public abstract class AbstractServer extends AbstractEndpoint implements Server {
+    
+    private static final Logger logger = LoggerFactory.getLogger(AbstractServer.class);
 
     private InetSocketAddress              localAddress;
 
@@ -56,25 +57,25 @@
 
     public AbstractServer(URL url, ChannelHandler handler) throws RemotingException {
         super(url, handler);
-        localAddress = getUrl().toInetSocketAddress();
-        String host = url.getParameter(Constants.ANYHOST_KEY, false) 
+        localAddress = getUrl().toInetSocketAddress();
+        String host = url.getParameter(Constants.ANYHOST_KEY, false) 
                         || NetUtils.isInvalidLocalHost(getUrl().getHost()) 
                         ? NetUtils.ANYHOST : getUrl().getHost();
         bindAddress = new InetSocketAddress(host, getUrl().getPort());
-        this.accepts = url.getParameter(Constants.ACCEPTS_KEY, Constants.DEFAULT_ACCEPTS);
-        this.idleTimeout = url.getParameter(Constants.IDLE_TIMEOUT_KEY, Constants.DEFAULT_IDLE_TIMEOUT);
+        this.accepts = url.getParameter(Constants.ACCEPTS_KEY, Constants.DEFAULT_ACCEPTS);
+        this.idleTimeout = url.getParameter(Constants.IDLE_TIMEOUT_KEY, Constants.DEFAULT_IDLE_TIMEOUT);
         try {
             doOpen();
             if (logger.isInfoEnabled()) {
                 logger.info("Start " + getClass().getSimpleName() + " bind " + getBindAddress() + ", export " + getLocalAddress());
             }
         } catch (Throwable t) {
-            throw new RemotingException(url.toInetSocketAddress(), null, "Failed to bind " + getClass().getSimpleName() 
+            throw new RemotingException(url.toInetSocketAddress(), null, "Failed to bind " + getClass().getSimpleName() 
                                         + " on " + getLocalAddress() + ", cause: " + t.getMessage(), t);
         }
-        if (handler instanceof WrappedChannelHandler ){
-            executor = ((WrappedChannelHandler)handler).getExecutor();
-        }
+
+        executor = (ExecutorService) ExtensionLoader.getExtensionLoader(DataStore.class)
+                .getDefaultExtension().get(Constants.EXECUTOR_SERVICE_COMPONENT_KEY, Integer.toString(url.getPort()));
     }
     
     protected abstract void doOpen() throws Throwable;
@@ -87,7 +88,7 @@ public void reset(URL url) {
         }
         try {
             if (url.hasParameter(Constants.ACCEPTS_KEY)) {
-                int a = url.getParameter(Constants.ACCEPTS_KEY, 0);
+                int a = url.getParameter(Constants.ACCEPTS_KEY, 0);
                 if (a > 0) {
                     this.accepts = a;
                 }
@@ -97,7 +98,7 @@ public void reset(URL url) {
         }
         try {
             if (url.hasParameter(Constants.IDLE_TIMEOUT_KEY)) {
-                int t = url.getParameter(Constants.IDLE_TIMEOUT_KEY, 0);
+                int t = url.getParameter(Constants.IDLE_TIMEOUT_KEY, 0);
                 if (t > 0) {
                     this.idleTimeout = t;
                 }
@@ -109,7 +110,7 @@ public void reset(URL url) {
             if (url.hasParameter(Constants.THREADS_KEY) 
                     && executor instanceof ThreadPoolExecutor && !executor.isShutdown()) {
                 ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executor;
-                int threads = url.getParameter(Constants.THREADS_KEY, 0);
+                int threads = url.getParameter(Constants.THREADS_KEY, 0);
                 int max = threadPoolExecutor.getMaximumPoolSize();
                 int core = threadPoolExecutor.getCorePoolSize();
                 if (threads > 0 && (threads != max || threads != core)) {
@@ -135,16 +136,16 @@ public void reset(URL url) {
     public void send(Object message, boolean sent) throws RemotingException {
         Collection<Channel> channels = getChannels();
         for (Channel channel : channels) {
-            if (channel.isConnected()) {
-                channel.send(message, sent);
+            if (channel.isConnected()) {
+                channel.send(message, sent);
             }
         }
-    }
-    
-    public void close() {
-        if (logger.isInfoEnabled()) {
-            logger.info("Close " + getClass().getSimpleName() + " bind " + getBindAddress() + ", export " + getLocalAddress());
-        }
+    }
+    
+    public void close() {
+        if (logger.isInfoEnabled()) {
+            logger.info("Close " + getClass().getSimpleName() + " bind " + getBindAddress() + ", export " + getLocalAddress());
+        }
         ExecutorUtil.shutdownNow(executor ,100);
         try {
             super.close();
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/codec/TransportCodec.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/codec/TransportCodec.java
index 1616a0b7ea..1c57885f00 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/codec/TransportCodec.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/transport/codec/TransportCodec.java
@@ -19,6 +19,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import com.alibaba.dubbo.common.serialize.Cleanable;
 import com.alibaba.dubbo.common.serialize.ObjectInput;
 import com.alibaba.dubbo.common.serialize.ObjectOutput;
 import com.alibaba.dubbo.common.utils.StringUtils;
@@ -40,11 +41,25 @@ public void encode(Channel channel, ChannelBuffer buffer, Object message) throws
         ObjectOutput objectOutput = getSerialization(channel).serialize(channel.getUrl(), output);
         encodeData(channel, objectOutput, message);
         objectOutput.flushBuffer();
+
+        // modified by lishen
+        if (objectOutput instanceof Cleanable) {
+            ((Cleanable) objectOutput).cleanup();
+        }
     }
 
     public Object decode(Channel channel, ChannelBuffer buffer) throws IOException {
+//        InputStream input = new ChannelBufferInputStream(buffer);
+//        return decodeData(channel, getSerialization(channel).deserialize(channel.getUrl(), input));
+
+        // modified by lishen
         InputStream input = new ChannelBufferInputStream(buffer);
-        return decodeData(channel, getSerialization(channel).deserialize(channel.getUrl(), input));
+        ObjectInput objectInput = getSerialization(channel).deserialize(channel.getUrl(), input);
+        Object object = decodeData(channel, objectInput);
+        if (objectInput instanceof Cleanable) {
+            ((Cleanable) objectInput).cleanup();
+        }
+        return object;
     }
 
     protected void encodeData(Channel channel, ObjectOutput output, Object message) throws IOException {
diff --git a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
index 4aac70bd47..ce4b652007 100644
--- a/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-grizzly/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-remoting</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting-grizzly</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-http/pom.xml b/dubbo-remoting/dubbo-remoting-http/pom.xml
index 8b30a08a74..c08a31deb7 100644
--- a/dubbo-remoting/dubbo-remoting-http/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-http/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-remoting</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting-http</artifactId>
 	<packaging>jar</packaging>
@@ -37,6 +37,20 @@
 		<dependency>
 			<groupId>org.mortbay.jetty</groupId>
 			<artifactId>jetty</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
 		</dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-logging-juli</artifactId>
+        </dependency>
 	</dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/jetty/JettyHttpServer.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/jetty/JettyHttpServer.java
index a722b00750..fd3ca9465a 100644
--- a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/jetty/JettyHttpServer.java
+++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/jetty/JettyHttpServer.java
@@ -15,10 +15,14 @@
  */
 package com.alibaba.dubbo.remoting.http.jetty;
 
+import com.alibaba.dubbo.remoting.http.servlet.ServletManager;
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.servlet.Context;
 import org.mortbay.jetty.servlet.ServletHandler;
 import org.mortbay.jetty.servlet.ServletHolder;
+import org.mortbay.log.Log;
+import org.mortbay.log.StdErrLog;
 import org.mortbay.thread.QueuedThreadPool;
 
 import com.alibaba.dubbo.common.Constants;
@@ -36,10 +40,19 @@
 
     private Server              server;
 
+    private URL url;
+
     public JettyHttpServer(URL url, final HttpHandler handler){
         super(url, handler);
+
+        // modified by lishen
+        this.url = url;
+        // TODO we should leave this setting to slf4j
+        Log.setLog(new StdErrLog());
+        Log.getLog().setDebugEnabled(false);
+
         DispatcherServlet.addHttpHandler(url.getPort(), handler);
-        
+
         int threads = url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS);
         QueuedThreadPool threadPool = new QueuedThreadPool();
         threadPool.setDaemon(true);
@@ -55,13 +68,19 @@ public JettyHttpServer(URL url, final HttpHandler handler){
         server = new Server();
         server.setThreadPool(threadPool);
         server.addConnector(connector);
-        
+
         ServletHandler servletHandler = new ServletHandler();
         ServletHolder servletHolder = servletHandler.addServletWithMapping(DispatcherServlet.class, "/*");
         servletHolder.setInitOrder(2);
-        
-        server.addHandler(servletHandler);
-        
+
+        // modified by lishen
+        // dubbo's original impl can't support the use of ServletContext
+//        server.addHandler(servletHandler);
+        // TODO Context.SESSIONS is the best option here?
+        Context context = new Context(server, "/", Context.SESSIONS);
+        context.setServletHandler(servletHandler);
+        ServletManager.getInstance().addServletContext(url.getPort(), context.getServletContext());
+
         try {
             server.start();
         } catch (Exception e) {
@@ -72,6 +91,10 @@ public JettyHttpServer(URL url, final HttpHandler handler){
 
     public void close() {
         super.close();
+
+        // modified by lishen
+        ServletManager.getInstance().removeServletContext(url.getPort());
+
         if (server != null) {
             try {
                 server.stop();
diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/servlet/BootstrapListener.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/servlet/BootstrapListener.java
new file mode 100644
index 0000000000..7a562574aa
--- /dev/null
+++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/servlet/BootstrapListener.java
@@ -0,0 +1,35 @@
+/**
+ * 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.remoting.http.servlet;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+/**
+ * This class must be defined before something like spring's ContextLoaderListener in web.xml
+ *
+ * @author lishen
+ */
+public class BootstrapListener implements ServletContextListener {
+
+    public void contextInitialized(ServletContextEvent servletContextEvent) {
+        ServletManager.getInstance().addServletContext(ServletManager.EXTERNAL_SERVER_PORT, servletContextEvent.getServletContext());
+    }
+
+    public void contextDestroyed(ServletContextEvent servletContextEvent) {
+        ServletManager.getInstance().removeServletContext(ServletManager.EXTERNAL_SERVER_PORT);
+    }
+}
diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/servlet/ServletManager.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/servlet/ServletManager.java
new file mode 100644
index 0000000000..8e9744d3aa
--- /dev/null
+++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/servlet/ServletManager.java
@@ -0,0 +1,51 @@
+/**
+ * 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.remoting.http.servlet;
+
+import javax.servlet.ServletContext;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * TODO this may not be a pretty elegant solution,
+ * and we may need to make change to the whole remoting-http architecture in the future
+ *
+ * @author lishen
+ */
+public class ServletManager {
+
+    public static final int EXTERNAL_SERVER_PORT = -1234;
+
+    private static final ServletManager instance = new ServletManager();
+
+    private final Map<Integer, ServletContext> contextMap = new ConcurrentHashMap<Integer, ServletContext>();
+
+    public static ServletManager getInstance() {
+        return instance;
+    }
+
+    public void addServletContext(int port, ServletContext servletContext) {
+        contextMap.put(port, servletContext);
+    }
+
+    public void removeServletContext(int port) {
+        contextMap.remove(port);
+    }
+
+    public ServletContext getServletContext(int port) {
+        return contextMap.get(port);
+    }
+}
diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpBinder.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpBinder.java
new file mode 100755
index 0000000000..fd6a05eb36
--- /dev/null
+++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpBinder.java
@@ -0,0 +1,32 @@
+/**
+ * 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.remoting.http.tomcat;
+
+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;
+
+/**
+ * @author lishen
+ */
+public class TomcatHttpBinder implements HttpBinder {
+
+    public HttpServer bind(URL url, HttpHandler handler) {
+        return new TomcatHttpServer(url, handler);
+    }
+
+}
\ No newline at end of file
diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java
new file mode 100755
index 0000000000..686d562ae6
--- /dev/null
+++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/com/alibaba/dubbo/remoting/http/tomcat/TomcatHttpServer.java
@@ -0,0 +1,91 @@
+/**
+ * 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.remoting.http.tomcat;
+
+
+import com.alibaba.dubbo.common.Constants;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.remoting.http.HttpHandler;
+import com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet;
+import com.alibaba.dubbo.remoting.http.servlet.ServletManager;
+import com.alibaba.dubbo.remoting.http.support.AbstractHttpServer;
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleException;
+import org.apache.catalina.startup.Tomcat;
+
+import java.io.File;
+
+
+/**
+ * @author lishen
+ */
+public class TomcatHttpServer extends AbstractHttpServer {
+
+    private static final Logger logger = LoggerFactory.getLogger(TomcatHttpServer.class);
+
+    private final Tomcat tomcat;
+
+    private final URL url;
+
+    public TomcatHttpServer(URL url, final HttpHandler handler) {
+        super(url, handler);
+
+        this.url = url;
+        DispatcherServlet.addHttpHandler(url.getPort(), handler);
+        String baseDir = new File(System.getProperty("java.io.tmpdir")).getAbsolutePath();
+        tomcat = new Tomcat();
+        tomcat.setBaseDir(baseDir);
+        tomcat.setPort(url.getPort());
+        tomcat.getConnector().setProperty(
+                "maxThreads", String.valueOf(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS)));
+//        tomcat.getConnector().setProperty(
+//                "minSpareThreads", String.valueOf(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS)));
+
+        tomcat.getConnector().setProperty(
+                "maxConnections", String.valueOf(url.getParameter(Constants.ACCEPTS_KEY, -1)));
+
+        tomcat.getConnector().setProperty("URIEncoding", "UTF-8");
+        tomcat.getConnector().setProperty("connectionTimeout", "60000");
+
+        tomcat.getConnector().setProperty("maxKeepAliveRequests", "-1");
+        tomcat.getConnector().setProtocol("org.apache.coyote.http11.Http11NioProtocol");
+
+        Context context = tomcat.addContext("/", baseDir);
+        Tomcat.addServlet(context, "dispatcher", new DispatcherServlet());
+        context.addServletMapping("/*", "dispatcher");
+        ServletManager.getInstance().addServletContext(url.getPort(), context.getServletContext());
+
+        try {
+            tomcat.start();
+        } catch (LifecycleException e) {
+            throw new IllegalStateException("Failed to start tomcat server at " + url.getAddress(), e);
+        }
+    }
+
+    public void close() {
+        super.close();
+
+        ServletManager.getInstance().removeServletContext(url.getPort());
+
+        try {
+            tomcat.stop();
+        } catch (Exception e) {
+            logger.warn(e.getMessage(), e);
+        }
+    }
+}
\ No newline at end of file
diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder b/dubbo-remoting/dubbo-remoting-http/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
index b1be1077e5..a241d7d563 100644
--- a/dubbo-remoting/dubbo-remoting-http/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
+++ b/dubbo-remoting/dubbo-remoting-http/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder
@@ -1,2 +1,3 @@
 servlet=com.alibaba.dubbo.remoting.http.servlet.ServletHttpBinder
-jetty=com.alibaba.dubbo.remoting.http.jetty.JettyHttpBinder
\ No newline at end of file
+jetty=com.alibaba.dubbo.remoting.http.jetty.JettyHttpBinder
+tomcat=com.alibaba.dubbo.remoting.http.tomcat.TomcatHttpBinder
\ No newline at end of file
diff --git a/dubbo-remoting/dubbo-remoting-mina/pom.xml b/dubbo-remoting/dubbo-remoting-mina/pom.xml
index 7cd615a50e..b3e36966f1 100644
--- a/dubbo-remoting/dubbo-remoting-mina/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-mina/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-remoting</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting-mina</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-netty/pom.xml b/dubbo-remoting/dubbo-remoting-netty/pom.xml
index 125b9569fc..afe4f78974 100644
--- a/dubbo-remoting/dubbo-remoting-netty/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-netty/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-remoting</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting-netty</artifactId>
 	<packaging>jar</packaging>
@@ -35,7 +35,7 @@
 			<version>${project.parent.version}</version>
 		</dependency>
 		<dependency>
-			<groupId>org.jboss.netty</groupId>
+			<groupId>io.netty</groupId>
 			<artifactId>netty</artifactId>
 		</dependency>
 	</dependencies>
diff --git a/dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty/NettyClient.java b/dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty/NettyClient.java
index 7825f88183..830cfb5e57 100644
--- a/dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty/NettyClient.java
+++ b/dubbo-remoting/dubbo-remoting-netty/src/main/java/com/alibaba/dubbo/remoting/transport/netty/NettyClient.java
@@ -53,6 +53,23 @@
     private static final ChannelFactory channelFactory = new NioClientSocketChannelFactory(Executors.newCachedThreadPool(new NamedThreadFactory("NettyClientBoss", true)), 
                                                                                            Executors.newCachedThreadPool(new NamedThreadFactory("NettyClientWorker", true)), 
                                                                                            Constants.DEFAULT_IO_THREADS);
+
+    static {
+        Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
+            public void run() {
+                if (logger.isInfoEnabled()) {
+                    logger.info("Run shutdown hook of netty client now.");
+                }
+
+                try {
+                    channelFactory.releaseExternalResources();
+                } catch (Throwable t) {
+                    logger.warn(t.getMessage());
+                }
+            }
+        }, "DubboShutdownHook-NettyClient"));
+    }
+
     private ClientBootstrap bootstrap;
 
     private volatile Channel channel; // volatile, please copy reference to use
diff --git a/dubbo-remoting/dubbo-remoting-p2p/pom.xml b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
index c6c51811f9..0dce25f736 100644
--- a/dubbo-remoting/dubbo-remoting-p2p/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-p2p/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-remoting</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting-p2p</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
index 2564ffc125..47520dae0d 100644
--- a/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
+++ b/dubbo-remoting/dubbo-remoting-zookeeper/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-remoting</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting-zookeeper</artifactId>
 	<packaging>jar</packaging>
@@ -43,7 +43,7 @@
 			<artifactId>zkclient</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>com.netflix.curator</groupId>
+			<groupId>org.apache.curator</groupId>
 			<artifactId>curator-framework</artifactId>
 		</dependency>
 	</dependencies>
diff --git a/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java b/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java
index e34bc9335c..6011e91c89 100644
--- a/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java
+++ b/dubbo-remoting/dubbo-remoting-zookeeper/src/main/java/com/alibaba/dubbo/remoting/zookeeper/curator/CuratorZookeeperClient.java
@@ -1,8 +1,15 @@
 package com.alibaba.dubbo.remoting.zookeeper.curator;
 
-import java.io.IOException;
 import java.util.List;
 
+import com.alibaba.dubbo.common.Constants;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.framework.CuratorFrameworkFactory.Builder;
+import org.apache.curator.framework.api.CuratorWatcher;
+import org.apache.curator.framework.state.ConnectionState;
+import org.apache.curator.framework.state.ConnectionStateListener;
+import org.apache.curator.retry.RetryNTimes;
 import org.apache.zookeeper.CreateMode;
 import org.apache.zookeeper.KeeperException.NoNodeException;
 import org.apache.zookeeper.KeeperException.NodeExistsException;
@@ -12,45 +19,41 @@
 import com.alibaba.dubbo.remoting.zookeeper.ChildListener;
 import com.alibaba.dubbo.remoting.zookeeper.StateListener;
 import com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient;
-import com.netflix.curator.framework.CuratorFramework;
-import com.netflix.curator.framework.CuratorFrameworkFactory;
-import com.netflix.curator.framework.CuratorFrameworkFactory.Builder;
-import com.netflix.curator.framework.api.CuratorWatcher;
-import com.netflix.curator.framework.state.ConnectionState;
-import com.netflix.curator.framework.state.ConnectionStateListener;
-import com.netflix.curator.retry.RetryNTimes;
 
-public class CuratorZookeeperClient extends AbstractZookeeperClient<CuratorWatcher> {
+public class CuratorZookeeperClient extends
+		AbstractZookeeperClient<CuratorWatcher> {
 
 	private final CuratorFramework client;
 
 	public CuratorZookeeperClient(URL url) {
 		super(url);
-		try {
-			Builder builder = CuratorFrameworkFactory.builder()
-					.connectString(url.getBackupAddress())
-			        .retryPolicy(new RetryNTimes(Integer.MAX_VALUE, 1000))  
-			        .connectionTimeoutMs(5000);
-			String authority = url.getAuthority();
-			if (authority != null && authority.length() > 0) {
-				builder = builder.authorization("digest", authority.getBytes());
-			}
-			client = builder.build();
-			client.getConnectionStateListenable().addListener(new ConnectionStateListener() {
-				public void stateChanged(CuratorFramework client, ConnectionState state) {
-					if (state == ConnectionState.LOST) {
-						CuratorZookeeperClient.this.stateChanged(StateListener.DISCONNECTED);
-					} else if (state == ConnectionState.CONNECTED) {
-						CuratorZookeeperClient.this.stateChanged(StateListener.CONNECTED);
-					} else if (state == ConnectionState.RECONNECTED) {
-						CuratorZookeeperClient.this.stateChanged(StateListener.RECONNECTED);
-					}
-				}
-			});
-			client.start();
-		} catch (IOException e) {
-			throw new IllegalStateException(e.getMessage(), e);
+		Builder builder = CuratorFrameworkFactory.builder()
+				.connectString(url.getBackupAddress())
+				.retryPolicy(new RetryNTimes(Integer.MAX_VALUE, 1000))
+				.connectionTimeoutMs(url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_REGISTRY_CONNECT_TIMEOUT))
+                .sessionTimeoutMs(url.getParameter(Constants.SESSION_TIMEOUT_KEY, Constants.DEFAULT_SESSION_TIMEOUT));
+		String authority = url.getAuthority();
+		if (authority != null && authority.length() > 0) {
+			builder = builder.authorization("digest", authority.getBytes());
 		}
+		client = builder.build();
+		client.getConnectionStateListenable().addListener(
+				new ConnectionStateListener() {
+					public void stateChanged(CuratorFramework client,
+							ConnectionState state) {
+						if (state == ConnectionState.LOST) {
+							CuratorZookeeperClient.this
+									.stateChanged(StateListener.DISCONNECTED);
+						} else if (state == ConnectionState.CONNECTED) {
+							CuratorZookeeperClient.this
+									.stateChanged(StateListener.CONNECTED);
+						} else if (state == ConnectionState.RECONNECTED) {
+							CuratorZookeeperClient.this
+									.stateChanged(StateListener.RECONNECTED);
+						}
+					}
+				});
+		client.start();
 	}
 
 	public void createPersistent(String path) {
@@ -97,31 +100,34 @@ public boolean isConnected() {
 	public void doClose() {
 		client.close();
 	}
-	
+
 	private class CuratorWatcherImpl implements CuratorWatcher {
-		
+
 		private volatile ChildListener listener;
-		
+
 		public CuratorWatcherImpl(ChildListener listener) {
 			this.listener = listener;
 		}
-		
+
 		public void unwatch() {
 			this.listener = null;
 		}
-		
+
 		public void process(WatchedEvent event) throws Exception {
 			if (listener != null) {
-				listener.childChanged(event.getPath(), client.getChildren().usingWatcher(this).forPath(event.getPath()));
+				listener.childChanged(event.getPath(), client.getChildren()
+						.usingWatcher(this).forPath(event.getPath()));
 			}
 		}
 	}
-	
-	public CuratorWatcher createTargetChildListener(String path, ChildListener listener) {
+
+	public CuratorWatcher createTargetChildListener(String path,
+			ChildListener listener) {
 		return new CuratorWatcherImpl(listener);
 	}
-	
-	public List<String> addTargetChildListener(String path, CuratorWatcher listener) {
+
+	public List<String> addTargetChildListener(String path,
+			CuratorWatcher listener) {
 		try {
 			return client.getChildren().usingWatcher(listener).forPath(path);
 		} catch (NoNodeException e) {
@@ -130,7 +136,7 @@ public CuratorWatcher createTargetChildListener(String path, ChildListener liste
 			throw new IllegalStateException(e.getMessage(), e);
 		}
 	}
-	
+
 	public void removeTargetChildListener(String path, CuratorWatcher listener) {
 		((CuratorWatcherImpl) listener).unwatch();
 	}
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 55c3c6c069..f1f43e6ba6 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
@@ -2,6 +2,7 @@
 
 import java.util.List;
 
+import com.alibaba.dubbo.common.Constants;
 import org.I0Itec.zkclient.IZkChildListener;
 import org.I0Itec.zkclient.IZkStateListener;
 import org.I0Itec.zkclient.ZkClient;
@@ -22,7 +23,10 @@
 
 	public ZkclientZookeeperClient(URL url) {
 		super(url);
-		client = new ZkClient(url.getBackupAddress());
+		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;
diff --git a/dubbo-remoting/pom.xml b/dubbo-remoting/pom.xml
index 3b2b630a8e..0c7faf42bb 100644
--- a/dubbo-remoting/pom.xml
+++ b/dubbo-remoting/pom.xml
@@ -18,7 +18,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-remoting</artifactId>
 	<packaging>pom</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-api/pom.xml b/dubbo-rpc/dubbo-rpc-api/pom.xml
index 6cf1777589..e713642d38 100644
--- a/dubbo-rpc/dubbo-rpc-api/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-api/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-api</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
index 25a34f4b62..e0d6cd7523 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
@@ -89,7 +89,12 @@ public static void removeContext() {
     private final Map<String, String> attachments = new HashMap<String, String>();
 
     private final Map<String, Object> values = new HashMap<String, Object>();
-    
+
+    // now we don't use the 'values' map to hold these objects
+    // we want these objects to be as generic as possible
+    private Object request;
+    private Object response;
+
 	@Deprecated
     private List<Invoker<?>> invokers;
     
@@ -102,6 +107,53 @@ public static void removeContext() {
 	protected RpcContext() {
 	}
 
+    /**
+     * Get the request object of the underlying RPC protocol, e.g. HttpServletRequest
+     *
+     * @return null if the underlying protocol doesn't provide support for getting request
+     */
+    public Object getRequest() {
+        return request;
+    }
+
+    /**
+     * Get the request object of the underlying RPC protocol, e.g. HttpServletRequest
+     *
+     * @return null if the underlying protocol doesn't provide support for getting request or the request is not of the specified type
+     */
+    @SuppressWarnings("unchecked")
+    public <T> T getRequest(Class<T> clazz) {
+        return (request != null && clazz.isAssignableFrom(request.getClass())) ? (T) request : null;
+    }
+
+
+    public void setRequest(Object request) {
+        this.request = request;
+    }
+
+    /**
+     * Get the response object of the underlying RPC protocol, e.g. HttpServletResponse
+     *
+     * @return null if the underlying protocol doesn't provide support for getting response
+     */
+    public Object getResponse() {
+        return response;
+    }
+
+    /**
+     * Get the response object of the underlying RPC protocol, e.g. HttpServletResponse
+     *
+     * @return null if the underlying protocol doesn't provide support for getting response or the response is not of the specified type
+     */
+    @SuppressWarnings("unchecked")
+    public <T> T getResponse(Class<T> clazz) {
+        return (response != null && clazz.isAssignableFrom(response.getClass())) ? (T) response : null;
+    }
+
+    public void setResponse(Object response) {
+        this.response = response;
+    }
+
     /**
      * is provider side.
      * 
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/ServiceClassHolder.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/ServiceClassHolder.java
new file mode 100644
index 0000000000..e6f9ec1516
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/ServiceClassHolder.java
@@ -0,0 +1,30 @@
+package com.alibaba.dubbo.rpc;
+
+/**
+ * TODO this is just a workround for rest protocol, and now we just ensure it works in the most common dubbo usages
+ *
+ * @author lishen
+ */
+public class ServiceClassHolder {
+
+    private static final ServiceClassHolder INSTANCE = new ServiceClassHolder();
+
+    private final ThreadLocal<Class> holder  = new ThreadLocal<Class>();
+
+    public static ServiceClassHolder getInstance() {
+        return INSTANCE;
+    }
+
+    private ServiceClassHolder() {
+    }
+
+    public Class popServiceClass() {
+        Class clazz = holder.get();
+        holder.remove();
+        return clazz;
+    }
+
+    public void pushServiceClass(Class clazz) {
+        holder.set(clazz);
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java
index f3736907a0..4097697ecf 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/filter/ContextFilter.java
@@ -50,9 +50,19 @@ public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcExcept
         RpcContext.getContext()
                 .setInvoker(invoker)
                 .setInvocation(invocation)
-                .setAttachments(attachments)
-                .setLocalAddress(invoker.getUrl().getHost(), 
-                                 invoker.getUrl().getPort());
+//                .setAttachments(attachments)  // modified by lishen
+                .setLocalAddress(invoker.getUrl().getHost(),
+                        invoker.getUrl().getPort());
+
+        // modified by lishen
+        if (attachments != null) {
+            if (RpcContext.getContext().getAttachments() != null) {
+                RpcContext.getContext().getAttachments().putAll(attachments);
+            } else {
+                RpcContext.getContext().setAttachments(attachments);
+            }
+        }
+
         if (invocation instanceof RpcInvocation) {
             ((RpcInvocation)invocation).setInvoker(invoker);
         }
diff --git a/dubbo-rpc/dubbo-rpc-default/pom.xml b/dubbo-rpc/dubbo-rpc-default/pom.xml
index 906ba76bd0..a31250d37d 100644
--- a/dubbo-rpc/dubbo-rpc-default/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-default/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-default</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
index 7ca3b9f5d9..8c1e46759c 100644
--- a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
+++ b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcInvocation.java
@@ -25,7 +25,10 @@
 import com.alibaba.dubbo.common.Constants;
 import com.alibaba.dubbo.common.logger.Logger;
 import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.common.serialize.Cleanable;
 import com.alibaba.dubbo.common.serialize.ObjectInput;
+import com.alibaba.dubbo.common.serialize.OptimizedSerialization;
+import com.alibaba.dubbo.common.serialize.support.kryo.KryoSerialization;
 import com.alibaba.dubbo.common.utils.Assert;
 import com.alibaba.dubbo.common.utils.ReflectUtils;
 import com.alibaba.dubbo.common.utils.StringUtils;
@@ -87,53 +90,83 @@ public void encode(Channel channel, OutputStream output, Object message) throws
 
     public Object decode(Channel channel, InputStream input) throws IOException {
         ObjectInput in = CodecSupport.getSerialization(channel.getUrl(), serializationType)
-            .deserialize(channel.getUrl(), input);
+                .deserialize(channel.getUrl(), input);
 
-        setAttachment(Constants.DUBBO_VERSION_KEY, in.readUTF());
-        setAttachment(Constants.PATH_KEY, in.readUTF());
-        setAttachment(Constants.VERSION_KEY, in.readUTF());
-
-        setMethodName(in.readUTF());
         try {
-            Object[] args;
-            Class<?>[] pts;
-            String desc = in.readUTF();
-            if (desc.length() == 0) {
-                pts = DubboCodec.EMPTY_CLASS_ARRAY;
-                args = DubboCodec.EMPTY_OBJECT_ARRAY;
-            } else {
-                pts = ReflectUtils.desc2classArray(desc);
-                args = new Object[pts.length];
-                for (int i = 0; i < args.length; i++) {
-                    try {
-                        args[i] = in.readObject(pts[i]);
-                    } catch (Exception e) {
-                        if (log.isWarnEnabled()) {
-                            log.warn("Decode argument failed: " + e.getMessage(), e);
+            setAttachment(Constants.DUBBO_VERSION_KEY, in.readUTF());
+            setAttachment(Constants.PATH_KEY, in.readUTF());
+            setAttachment(Constants.VERSION_KEY, in.readUTF());
+
+            setMethodName(in.readUTF());
+            try {
+                Object[] args;
+                Class<?>[] pts;
+
+                // NOTICE modified by lishen
+                int argNum = in.readInt();
+                if (argNum >= 0) {
+                    if (argNum == 0) {
+                        pts = DubboCodec.EMPTY_CLASS_ARRAY;
+                        args = DubboCodec.EMPTY_OBJECT_ARRAY;
+                    } else {
+                        args = new Object[argNum];
+                        pts = new Class[argNum];
+                        for (int i = 0; i < args.length; i++) {
+                            try {
+                                args[i] = in.readObject();
+                                pts[i] = args[i].getClass();
+                            } catch (Exception e) {
+                                if (log.isWarnEnabled()) {
+                                    log.warn("Decode argument failed: " + e.getMessage(), e);
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    String desc = in.readUTF();
+                    if (desc.length() == 0) {
+                        pts = DubboCodec.EMPTY_CLASS_ARRAY;
+                        args = DubboCodec.EMPTY_OBJECT_ARRAY;
+                    } else {
+                        pts = ReflectUtils.desc2classArray(desc);
+                        args = new Object[pts.length];
+                        for (int i = 0; i < args.length; i++) {
+                            try {
+                                args[i] = in.readObject(pts[i]);
+                            } catch (Exception e) {
+                                if (log.isWarnEnabled()) {
+                                    log.warn("Decode argument failed: " + e.getMessage(), e);
+                                }
+                            }
                         }
                     }
                 }
-            }
-            setParameterTypes(pts);
+                setParameterTypes(pts);
 
-            Map<String, String> map = (Map<String, String>) in.readObject(Map.class);
-            if (map != null && map.size() > 0) {
-                Map<String, String> attachment = getAttachments();
-                if (attachment == null) {
-                    attachment = new HashMap<String, String>();
+                Map<String, String> map = (Map<String, String>) in.readObject(Map.class);
+                if (map != null && map.size() > 0) {
+                    Map<String, String> attachment = getAttachments();
+                    if (attachment == null) {
+                        attachment = new HashMap<String, String>();
+                    }
+                    attachment.putAll(map);
+                    setAttachments(attachment);
+                }
+                //decode argument ,may be callback
+                for (int i = 0; i < args.length; i++) {
+                    args[i] = decodeInvocationArgument(channel, this, pts, i, args[i]);
                 }
-                attachment.putAll(map);
-                setAttachments(attachment);
-            }
-            //decode argument ,may be callback
-            for (int i = 0; i < args.length; i++) {
-                args[i] = decodeInvocationArgument(channel, this, pts, i, args[i]);
-            }
 
-            setArguments(args);
+                setArguments(args);
 
-        } catch (ClassNotFoundException e) {
-            throw new IOException(StringUtils.toString("Read invocation data failed.", e));
+            } catch (ClassNotFoundException e) {
+                throw new IOException(StringUtils.toString("Read invocation data failed.", e));
+            }
+        } finally {
+            // modified by lishen
+            if (in instanceof Cleanable) {
+                ((Cleanable) in).cleanup();
+            }
         }
         return this;
     }
diff --git a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcResult.java b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcResult.java
index 27dd08029f..6c1d0b46be 100644
--- a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcResult.java
+++ b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DecodeableRpcResult.java
@@ -23,6 +23,7 @@
 
 import com.alibaba.dubbo.common.logger.Logger;
 import com.alibaba.dubbo.common.logger.LoggerFactory;
+import com.alibaba.dubbo.common.serialize.Cleanable;
 import com.alibaba.dubbo.common.serialize.ObjectInput;
 import com.alibaba.dubbo.common.utils.Assert;
 import com.alibaba.dubbo.common.utils.StringUtils;
@@ -73,34 +74,41 @@ public Object decode(Channel channel, InputStream input) throws IOException {
         ObjectInput in = CodecSupport.getSerialization(channel.getUrl(), serializationType)
             .deserialize(channel.getUrl(), input);
 
-        byte flag = in.readByte();
-        switch (flag) {
-            case DubboCodec.RESPONSE_NULL_VALUE:
-                break;
-            case DubboCodec.RESPONSE_VALUE:
-                try {
-                    Type[] returnType = RpcUtils.getReturnTypes(invocation);
-                    setValue(returnType == null || returnType.length == 0 ? in.readObject() :
-                                 (returnType.length == 1 ? in.readObject((Class<?>) returnType[0])
-                                     : in.readObject((Class<?>) returnType[0], returnType[1])));
-                } catch (ClassNotFoundException e) {
-                    throw new IOException(StringUtils.toString("Read response data failed.", e));
-                }
-                break;
-            case DubboCodec.RESPONSE_WITH_EXCEPTION:
-                try {
-                    Object obj = in.readObject();
-                    if (obj instanceof Throwable == false)
-                        throw new IOException("Response data error, expect Throwable, but get " + obj);
-                    setException((Throwable) obj);
-                } catch (ClassNotFoundException e) {
-                    throw new IOException(StringUtils.toString("Read response data failed.", e));
-                }
-                break;
-            default:
-                throw new IOException("Unknown result flag, expect '0' '1' '2', get " + flag);
+        try {
+            byte flag = in.readByte();
+            switch (flag) {
+                case DubboCodec.RESPONSE_NULL_VALUE:
+                    break;
+                case DubboCodec.RESPONSE_VALUE:
+                    try {
+                        Type[] returnType = RpcUtils.getReturnTypes(invocation);
+                        setValue(returnType == null || returnType.length == 0 ? in.readObject() :
+                                     (returnType.length == 1 ? in.readObject((Class<?>) returnType[0])
+                                         : in.readObject((Class<?>) returnType[0], returnType[1])));
+                    } catch (ClassNotFoundException e) {
+                        throw new IOException(StringUtils.toString("Read response data failed.", e));
+                    }
+                    break;
+                case DubboCodec.RESPONSE_WITH_EXCEPTION:
+                    try {
+                        Object obj = in.readObject();
+                        if (obj instanceof Throwable == false)
+                            throw new IOException("Response data error, expect Throwable, but get " + obj);
+                        setException((Throwable) obj);
+                    } catch (ClassNotFoundException e) {
+                        throw new IOException(StringUtils.toString("Read response data failed.", e));
+                    }
+                    break;
+                default:
+                    throw new IOException("Unknown result flag, expect '0' '1' '2', get " + flag);
+            }
+            return this;
+        } finally {
+            // modified by lishen
+            if (in instanceof Cleanable) {
+                ((Cleanable) in).cleanup();
+            }
         }
-        return this;
     }
 
     public void decode() throws Exception {
diff --git a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboCodec.java b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboCodec.java
index 346c77d68a..3e5fd8944f 100644
--- a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboCodec.java
+++ b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboCodec.java
@@ -27,6 +27,7 @@
 import com.alibaba.dubbo.common.logger.LoggerFactory;
 import com.alibaba.dubbo.common.serialize.ObjectInput;
 import com.alibaba.dubbo.common.serialize.ObjectOutput;
+import com.alibaba.dubbo.common.serialize.OptimizedSerialization;
 import com.alibaba.dubbo.common.serialize.Serialization;
 import com.alibaba.dubbo.common.utils.ReflectUtils;
 import com.alibaba.dubbo.common.utils.StringUtils;
@@ -90,15 +91,15 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
                     } else {
                         DecodeableRpcResult result;
                         if (channel.getUrl().getParameter(
-                            Constants.DECODE_IN_IO_THREAD_KEY,
-                            Constants.DEFAULT_DECODE_IN_IO_THREAD)) {
+                                Constants.DECODE_IN_IO_THREAD_KEY,
+                                Constants.DEFAULT_DECODE_IN_IO_THREAD)) {
                             result = new DecodeableRpcResult(channel, res, is,
-                                                             (Invocation)getRequestData(id), proto);
+                                    (Invocation)getRequestData(id), proto);
                             result.decode();
                         } else {
                             result = new DecodeableRpcResult(channel, res,
-                                                             new UnsafeByteArrayInputStream(readMessageData(is)),
-                                                             (Invocation) getRequestData(id), proto);
+                                    new UnsafeByteArrayInputStream(readMessageData(is)),
+                                    (Invocation) getRequestData(id), proto);
                         }
                         data = result;
                     }
@@ -131,13 +132,13 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
                 } else {
                     DecodeableRpcInvocation inv;
                     if (channel.getUrl().getParameter(
-                        Constants.DECODE_IN_IO_THREAD_KEY,
-                        Constants.DEFAULT_DECODE_IN_IO_THREAD)) {
+                            Constants.DECODE_IN_IO_THREAD_KEY,
+                            Constants.DEFAULT_DECODE_IN_IO_THREAD)) {
                         inv = new DecodeableRpcInvocation(channel, req, is, proto);
                         inv.decode();
                     } else {
                         inv = new DecodeableRpcInvocation(channel, req,
-                                                          new UnsafeByteArrayInputStream(readMessageData(is)), proto);
+                                new UnsafeByteArrayInputStream(readMessageData(is)), proto);
                     }
                     data = inv;
                 }
@@ -155,7 +156,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
     }
 
     private ObjectInput deserialize(Serialization serialization, URL url, InputStream is)
-        throws IOException {
+            throws IOException {
         return serialization.deserialize(url, is);
     }
 
@@ -177,12 +178,21 @@ protected void encodeRequestData(Channel channel, ObjectOutput out, Object data)
         out.writeUTF(inv.getAttachment(Constants.VERSION_KEY));
 
         out.writeUTF(inv.getMethodName());
-        out.writeUTF(ReflectUtils.getDesc(inv.getParameterTypes()));
+
+        // NOTICE modified by lishen
+        // TODO
+        if (getSerialization(channel) instanceof OptimizedSerialization && !containComplexArguments(inv)) {
+            out.writeInt(inv.getParameterTypes().length);
+        } else {
+            out.writeInt(-1);
+            out.writeUTF(ReflectUtils.getDesc(inv.getParameterTypes()));
+        }
+
         Object[] args = inv.getArguments();
         if (args != null)
-        for (int i = 0; i < args.length; i++){
-            out.writeObject(encodeInvocationArgument(channel, inv, i));
-        }
+            for (int i = 0; i < args.length; i++){
+                out.writeObject(encodeInvocationArgument(channel, inv, i));
+            }
         out.writeObject(inv.getAttachments());
     }
 
@@ -204,4 +214,14 @@ protected void encodeResponseData(Channel channel, ObjectOutput out, Object data
             out.writeObject(th);
         }
     }
+
+    // workaround for the target method matching of kryo & fst
+    private boolean containComplexArguments(RpcInvocation invocation) {
+        for (int i = 0; i < invocation.getParameterTypes().length; i++) {
+            if (invocation.getArguments()[i] == null || invocation.getParameterTypes()[i] != invocation.getArguments()[i].getClass()) {
+                return true;
+            }
+        }
+        return false;
+    }
 }
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java
index f413af6fca..b90cd1274d 100644
--- a/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java
+++ b/dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java
@@ -29,6 +29,9 @@
 import com.alibaba.dubbo.common.URL;
 import com.alibaba.dubbo.common.Version;
 import com.alibaba.dubbo.common.extension.ExtensionLoader;
+import com.alibaba.dubbo.common.serialize.support.SerializableClassRegistry;
+import com.alibaba.dubbo.common.serialize.support.SerializationOptimizer;
+import com.alibaba.dubbo.common.utils.ConcurrentHashSet;
 import com.alibaba.dubbo.common.utils.NetUtils;
 import com.alibaba.dubbo.common.utils.StringUtils;
 import com.alibaba.dubbo.remoting.Channel;
@@ -71,7 +74,9 @@
     private final Map<String, ReferenceCountExchangeClient> referenceClientMap = new ConcurrentHashMap<String, ReferenceCountExchangeClient>(); // <host:port,Exchanger>
     
     private final ConcurrentMap<String, LazyConnectExchangeClient> ghostClientMap = new ConcurrentHashMap<String, LazyConnectExchangeClient>();
-    
+
+    private final Set<String> optimizers = new ConcurrentHashSet<String>();
+
     //consumer side export a stub service for dispatching event
     //servicekey-stubmethods
     private final ConcurrentMap<String, String> stubServiceMethodsMap = new ConcurrentHashMap<String, String>();
@@ -251,9 +256,46 @@ public int getDefaultPort() {
         }
 
         openServer(url);
-        
+
+        // modified by lishen
+        optimizeSerialization(url);
+
         return exporter;
     }
+
+    private void optimizeSerialization(URL url) throws RpcException {
+        String className = url.getParameter(Constants.OPTIMIZER_KEY, "");
+        if (StringUtils.isEmpty(className) || optimizers.contains(className)) {
+            return;
+        }
+
+        logger.info("Optimizing the serialization process for Kryo, FST, etc...");
+
+        try {
+            Class clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
+            if (!SerializationOptimizer.class.isAssignableFrom(clazz)) {
+                throw new RpcException("The serialization optimizer " + className + " isn't an instance of " + SerializationOptimizer.class.getName());
+            }
+
+            SerializationOptimizer optimizer = (SerializationOptimizer) clazz.newInstance();
+
+            if (optimizer.getSerializableClasses() == null) {
+                return;
+            }
+
+            for (Class c : optimizer.getSerializableClasses()) {
+                SerializableClassRegistry.registerClass(c);
+            }
+
+            optimizers.add(className);
+        } catch (ClassNotFoundException e) {
+            throw new RpcException("Cannot find the serialization optimizer class: " + className, e);
+        } catch (InstantiationException e) {
+            throw new RpcException("Cannot instantiate the serialization optimizer class: " + className, e);
+        } catch (IllegalAccessException e) {
+            throw new RpcException("Cannot instantiate the serialization optimizer class: " + className, e);
+        }
+    }
     
     private void openServer(URL url) {
         // find server.
@@ -299,6 +341,10 @@ private ExchangeServer createServer(URL url) {
     }
 
     public <T> Invoker<T> refer(Class<T> serviceType, URL url) throws RpcException {
+
+        // modified by lishen
+        optimizeSerialization(url);
+
         // create rpc invoker.
         DubboInvoker<T> invoker = new DubboInvoker<T>(serviceType, url, getClients(url), invokers);
         invokers.add(invoker);
diff --git a/dubbo-rpc/dubbo-rpc-hessian/pom.xml b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
index 5002898948..bf5e50cb4c 100644
--- a/dubbo-rpc/dubbo-rpc-hessian/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-hessian/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-hessian</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-http/pom.xml b/dubbo-rpc/dubbo-rpc-http/pom.xml
index 9eb8901c8d..a2ad7c134f 100644
--- a/dubbo-rpc/dubbo-rpc-http/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-http/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-http</artifactId>
 	<packaging>jar</packaging>
@@ -41,7 +41,11 @@
 		</dependency>
 		<dependency>
 			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
+			<artifactId>spring-context</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
 		</dependency>
 	</dependencies>
 </project>
\ 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 cf4f500888..dcdda8d534 100644
--- a/dubbo-rpc/dubbo-rpc-injvm/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-injvm/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-injvm</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-memcached/pom.xml b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
index dfcde46c0f..6a2af14c3c 100644
--- a/dubbo-rpc/dubbo-rpc-memcached/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-memcached/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-memcached</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-rpc/dubbo-rpc-memcached/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-memcached/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
index 39883b50c1..e4588f21d9 100644
--- a/dubbo-rpc/dubbo-rpc-memcached/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
+++ b/dubbo-rpc/dubbo-rpc-memcached/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
@@ -1 +1 @@
-memcached=memcom.alibaba.dubbo.rpc.protocol.memcached.MemcachedProtocol
\ No newline at end of file
+memcached=com.alibaba.dubbo.rpc.protocol.memcached.MemcachedProtocol
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-redis/pom.xml b/dubbo-rpc/dubbo-rpc-redis/pom.xml
index 86902eb96b..9e39b9fa31 100644
--- a/dubbo-rpc/dubbo-rpc-redis/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-redis/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-redis</artifactId>
 	<packaging>jar</packaging>
@@ -39,5 +39,9 @@
 			<artifactId>jedis</artifactId>
 			<scope>provided</scope>
 		</dependency>
+		<dependency>
+			<groupId>commons-pool</groupId>
+			<artifactId>commons-pool</artifactId>
+		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-rest/pom.xml b/dubbo-rpc/dubbo-rpc-rest/pom.xml
new file mode 100644
index 0000000000..11edf84ca9
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/pom.xml
@@ -0,0 +1,103 @@
+<!--
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.alibaba</groupId>
+		<artifactId>dubbo-rpc</artifactId>
+		<version>2.8.4</version>
+	</parent>
+	<artifactId>dubbo-rpc-rest</artifactId>
+	<packaging>jar</packaging>
+	<name>${project.artifactId}</name>
+	<description>The JAX-RS rpc module of dubbo project</description>
+	<properties>
+		<skip_maven_deploy>true</skip_maven_deploy>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>dubbo-rpc-api</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-http</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxrs</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-client</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+
+        <!-- optional dependencies ==================== -->
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-netty</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jdk-http</artifactId>
+        </dependency>
+
+        <!--<dependency>-->
+            <!--<groupId>org.jboss.resteasy</groupId>-->
+            <!--<artifactId>tjws</artifactId>-->
+            <!--<version>3.0.7.Final</version>-->
+        <!--</dependency>-->
+
+        <!--<dependency>-->
+            <!--<groupId>org.jboss.resteasy</groupId>-->
+            <!--<artifactId>resteasy-undertow</artifactId>-->
+            <!--<version>3.0.7.Final</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+            <!--<groupId>io.undertow</groupId>-->
+            <!--<artifactId>undertow-servlet</artifactId>-->
+            <!--<version>1.0.1.Final</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+            <!--<groupId>io.undertow</groupId>-->
+            <!--<artifactId>undertow-core</artifactId>-->
+            <!--<version>1.0.1.Final</version>-->
+        <!--</dependency>-->
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jackson-provider</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jaxb-provider</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/BaseRestServer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/BaseRestServer.java
new file mode 100644
index 0000000000..a788043e66
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/BaseRestServer.java
@@ -0,0 +1,64 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.common.Constants;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.utils.StringUtils;
+import org.jboss.resteasy.spi.ResteasyDeployment;
+
+/**
+ * @author lishen
+ */
+public abstract class BaseRestServer implements RestServer {
+
+    public void start(URL url) {
+        getDeployment().getMediaTypeMappings().put("json", "application/json");
+        getDeployment().getMediaTypeMappings().put("xml", "text/xml");
+//        server.getDeployment().getMediaTypeMappings().put("xml", "application/xml");
+        getDeployment().getProviderClasses().add(RpcContextFilter.class.getName());
+        // TODO users can override this mapper, but we just rely on the current priority strategy of resteasy
+        getDeployment().getProviderClasses().add(RpcExceptionMapper.class.getName());
+
+        loadProviders(url.getParameter(Constants.EXTENSION_KEY, ""));
+
+        doStart(url);
+    }
+
+    public void deploy(Class resourceDef, Object resourceInstance, String contextPath) {
+        if (StringUtils.isEmpty(contextPath)) {
+            getDeployment().getRegistry().addResourceFactory(new DubboResourceFactory(resourceInstance, resourceDef));
+        } else {
+            getDeployment().getRegistry().addResourceFactory(new DubboResourceFactory(resourceInstance, resourceDef), contextPath);
+        }
+    }
+
+    public void undeploy(Class resourceDef) {
+        getDeployment().getRegistry().removeRegistrations(resourceDef);
+    }
+
+    protected void loadProviders(String value) {
+        for (String clazz : Constants.COMMA_SPLIT_PATTERN.split(value)) {
+            if (!StringUtils.isEmpty(clazz)) {
+                getDeployment().getProviderClasses().add(clazz.trim());
+            }
+        }
+    }
+
+    protected abstract ResteasyDeployment getDeployment();
+
+    protected abstract void doStart(URL url);
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/DubboHttpServer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/DubboHttpServer.java
new file mode 100644
index 0000000000..92d259907d
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/DubboHttpServer.java
@@ -0,0 +1,122 @@
+/**
+ * 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.rpc.protocol.rest;
+
+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.BootstrapListener;
+import com.alibaba.dubbo.remoting.http.servlet.ServletManager;
+import com.alibaba.dubbo.rpc.RpcContext;
+import com.alibaba.dubbo.rpc.RpcException;
+import org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher;
+import org.jboss.resteasy.spi.ResteasyDeployment;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Enumeration;
+
+/**
+ * @author lishen
+ */
+public class DubboHttpServer extends BaseRestServer {
+
+    private final HttpServletDispatcher dispatcher = new HttpServletDispatcher();
+    private final ResteasyDeployment deployment = new ResteasyDeployment();
+    private HttpBinder httpBinder;
+    private HttpServer httpServer;
+//    private boolean isExternalServer;
+
+    public DubboHttpServer(HttpBinder httpBinder) {
+        this.httpBinder = httpBinder;
+    }
+
+    protected void doStart(URL url) {
+        // TODO jetty will by default enable keepAlive so the xml config has no effect now
+        httpServer = httpBinder.bind(url, new RestHandler());
+
+        ServletContext servletContext = ServletManager.getInstance().getServletContext(url.getPort());
+        if (servletContext == null) {
+            servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT);
+        }
+        if (servletContext == null) {
+            throw new RpcException("No servlet context found. If you are using server='servlet', " +
+                    "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml");
+        }
+
+        servletContext.setAttribute(ResteasyDeployment.class.getName(), deployment);
+
+        try {
+            dispatcher.init(new SimpleServletConfig(servletContext));
+        } catch (ServletException e) {
+            throw new RpcException(e);
+        }
+    }
+
+    public void stop() {
+        httpServer.close();
+    }
+
+    protected ResteasyDeployment getDeployment() {
+        return deployment;
+    }
+
+    private class RestHandler implements HttpHandler {
+
+        public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
+            RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
+            dispatcher.service(request, response);
+        }
+    }
+
+    private static class SimpleServletConfig implements ServletConfig {
+
+        private final ServletContext servletContext;
+
+        public SimpleServletConfig(ServletContext servletContext) {
+            this.servletContext = servletContext;
+        }
+
+        public String getServletName() {
+            return "DispatcherServlet";
+        }
+
+        public ServletContext getServletContext() {
+            return servletContext;
+        }
+
+        public String getInitParameter(String s) {
+            return null;
+        }
+
+        public Enumeration getInitParameterNames() {
+            return new Enumeration() {
+                public boolean hasMoreElements() {
+                    return false;
+                }
+
+                public Object nextElement() {
+                    return null;
+                }
+            };
+        }
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/DubboResourceFactory.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/DubboResourceFactory.java
new file mode 100644
index 0000000000..c28cc22518
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/DubboResourceFactory.java
@@ -0,0 +1,71 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import org.jboss.resteasy.spi.HttpRequest;
+import org.jboss.resteasy.spi.HttpResponse;
+import org.jboss.resteasy.spi.ResourceFactory;
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
+
+/**
+ * We don't support propertyInjector here since the resource impl should be singleton in dubbo
+ *
+ * @author lishen
+ */
+public class DubboResourceFactory implements ResourceFactory {
+
+    private Object resourceInstance;
+    private Class scannableClass;
+//    private PropertyInjector propertyInjector;
+//    private String context = null;
+
+    public DubboResourceFactory(Object resourceInstance, Class scannableClass) {
+        this.resourceInstance = resourceInstance;
+        this.scannableClass = scannableClass;
+    }
+
+//    public PropertyInjector getPropertyInjector() {
+//        return propertyInjector;
+//    }
+
+    public Object createResource(HttpRequest request, HttpResponse response,
+                                 ResteasyProviderFactory factory) {
+        return resourceInstance;
+    }
+
+    public Class<?> getScannableClass() {
+        return scannableClass;
+    }
+
+    public void registered(ResteasyProviderFactory factory) {
+//        this.propertyInjector = factory.getInjectorFactory().createPropertyInjector(getScannableClass(), factory);
+    }
+
+    public void requestFinished(HttpRequest request, HttpResponse response,
+                                Object resource) {
+    }
+
+    public void unregistered() {
+    }
+
+//    public void setContext(String context) {
+//        this.context = context;
+//    }
+//
+//    public String getContext() {
+//        return context;
+//    }
+}
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/NettyServer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/NettyServer.java
new file mode 100644
index 0000000000..2bfdd65ebc
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/NettyServer.java
@@ -0,0 +1,47 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.common.Constants;
+import com.alibaba.dubbo.common.URL;
+import org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer;
+import org.jboss.resteasy.spi.ResteasyDeployment;
+
+/**
+ * Netty server can't support @Context injection of servlet objects since it's not a servlet container
+ *
+ * @author lishen
+ */
+public class NettyServer extends BaseRestServer {
+
+    private final NettyJaxrsServer server = new NettyJaxrsServer();
+
+    protected void doStart(URL url) {
+        server.setPort(url.getPort());
+        server.setKeepAlive(url.getParameter(Constants.KEEP_ALIVE_KEY, Constants.DEFAULT_KEEP_ALIVE));
+        server.setExecutorThreadCount(url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS));
+        server.setIoWorkerCount(url.getParameter(Constants.IO_THREADS_KEY, Constants.DEFAULT_IO_THREADS));
+        server.start();
+    }
+
+    public void stop() {
+        server.stop();
+    }
+
+    protected ResteasyDeployment getDeployment() {
+        return server.getDeployment();
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestConstraintViolation.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestConstraintViolation.java
new file mode 100644
index 0000000000..8c73243efc
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestConstraintViolation.java
@@ -0,0 +1,68 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement(name = "constraintViolation")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class RestConstraintViolation implements Serializable {
+
+    private static final long serialVersionUID = -23497234978L;
+
+    private String path;
+    private String message;
+    private String value;
+
+    public RestConstraintViolation(String path, String message, String value) {
+        this.path = path;
+        this.message = message;
+        this.value = value;
+    }
+
+    public RestConstraintViolation() {
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestProtocol.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestProtocol.java
new file mode 100644
index 0000000000..918f28f91a
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestProtocol.java
@@ -0,0 +1,265 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.common.Constants;
+import com.alibaba.dubbo.common.URL;
+import com.alibaba.dubbo.common.utils.StringUtils;
+import com.alibaba.dubbo.remoting.http.HttpBinder;
+import com.alibaba.dubbo.remoting.http.servlet.BootstrapListener;
+import com.alibaba.dubbo.remoting.http.servlet.ServletManager;
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol;
+import com.alibaba.dubbo.rpc.ServiceClassHolder;
+import org.apache.http.HeaderElement;
+import org.apache.http.HeaderElementIterator;
+import org.apache.http.HttpResponse;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.ConnectionKeepAliveStrategy;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.conn.PoolingClientConnectionManager;
+import org.apache.http.message.BasicHeaderElementIterator;
+import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.HttpParams;
+import org.apache.http.protocol.HTTP;
+import org.apache.http.protocol.HttpContext;
+import org.jboss.resteasy.client.jaxrs.ResteasyClient;
+import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
+import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
+import org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine;
+import org.jboss.resteasy.util.GetRestful;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.ProcessingException;
+import javax.ws.rs.WebApplicationException;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author lishen
+ */
+public class RestProtocol extends AbstractProxyProtocol {
+
+    private static final int DEFAULT_PORT = 80;
+
+    private final Map<String, RestServer> servers = new ConcurrentHashMap<String, RestServer>();
+
+    private final RestServerFactory serverFactory = new RestServerFactory();
+
+    // TODO in the future maybe we can just use a single rest client and connection manager
+    private final List<ResteasyClient> clients = Collections.synchronizedList(new LinkedList<ResteasyClient>());
+
+    private volatile ConnectionMonitor connectionMonitor;
+
+    public RestProtocol() {
+        super(WebApplicationException.class, ProcessingException.class);
+    }
+
+    public void setHttpBinder(HttpBinder httpBinder) {
+        serverFactory.setHttpBinder(httpBinder);
+    }
+
+    public int getDefaultPort() {
+        return DEFAULT_PORT;
+    }
+
+    protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcException {
+        String addr = url.getIp() + ":" + url.getPort();
+        Class implClass = ServiceClassHolder.getInstance().popServiceClass();
+        RestServer server = servers.get(addr);
+        if (server == null) {
+            server = serverFactory.createServer(url.getParameter(Constants.SERVER_KEY, "jetty"));
+            server.start(url);
+            servers.put(addr, server);
+        }
+
+        String contextPath = getContextPath(url);
+        if ("servlet".equalsIgnoreCase(url.getParameter(Constants.SERVER_KEY, "jetty"))) {
+            ServletContext servletContext = ServletManager.getInstance().getServletContext(ServletManager.EXTERNAL_SERVER_PORT);
+            if (servletContext == null) {
+                throw new RpcException("No servlet context found. Since you are using server='servlet', " +
+                        "make sure that you've configured " + BootstrapListener.class.getName() + " in web.xml");
+            }
+            String webappPath = servletContext.getContextPath();
+            if (StringUtils.isNotEmpty(webappPath)) {
+                webappPath = webappPath.substring(1);
+                if (!contextPath.startsWith(webappPath)) {
+                    throw new RpcException("Since you are using server='servlet', " +
+                            "make sure that the 'contextpath' property starts with the path of external webapp");
+                }
+                contextPath = contextPath.substring(webappPath.length());
+                if (contextPath.startsWith("/")) {
+                    contextPath = contextPath.substring(1);
+                }
+            }
+        }
+
+        final Class resourceDef = GetRestful.getRootResourceClass(implClass) != null ? implClass : type;
+
+        server.deploy(resourceDef, impl, contextPath);
+
+        final RestServer s = server;
+        return new Runnable() {
+            public void run() {
+                // TODO due to dubbo's current architecture,
+                // it will be called from registry protocol in the shutdown process and won't appear in logs
+                s.undeploy(resourceDef);
+            }
+        };
+    }
+
+    protected <T> T doRefer(Class<T> serviceType, URL url) throws RpcException {
+        if (connectionMonitor == null) {
+            connectionMonitor = new ConnectionMonitor();
+        }
+
+        // TODO more configs to add
+
+        PoolingClientConnectionManager connectionManager = new PoolingClientConnectionManager();
+        // 20 is the default maxTotal of current PoolingClientConnectionManager
+        connectionManager.setMaxTotal(url.getParameter(Constants.CONNECTIONS_KEY, 20));
+        connectionManager.setDefaultMaxPerRoute(url.getParameter(Constants.CONNECTIONS_KEY, 20));
+
+        connectionMonitor.addConnectionManager(connectionManager);
+
+//        BasicHttpContext localContext = new BasicHttpContext();
+
+        DefaultHttpClient httpClient = new DefaultHttpClient(connectionManager);
+
+        httpClient.setKeepAliveStrategy(new ConnectionKeepAliveStrategy() {
+            public long getKeepAliveDuration(HttpResponse response, HttpContext context) {
+                HeaderElementIterator it = new BasicHeaderElementIterator(response.headerIterator(HTTP.CONN_KEEP_ALIVE));
+                while (it.hasNext()) {
+                    HeaderElement he = it.nextElement();
+                    String param = he.getName();
+                    String value = he.getValue();
+                    if (value != null && param.equalsIgnoreCase("timeout")) {
+                        return Long.parseLong(value) * 1000;
+                    }
+                }
+                // TODO constant
+                return 30 * 1000;
+            }
+        });
+
+        HttpParams params = httpClient.getParams();
+        // TODO currently no xml config for Constants.CONNECT_TIMEOUT_KEY so we directly reuse Constants.TIMEOUT_KEY for now
+        HttpConnectionParams.setConnectionTimeout(params, url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT));
+        HttpConnectionParams.setSoTimeout(params, url.getParameter(Constants.TIMEOUT_KEY, Constants.DEFAULT_TIMEOUT));
+        HttpConnectionParams.setTcpNoDelay(params, true);
+        HttpConnectionParams.setSoKeepalive(params, true);
+
+        ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpClient/*, localContext*/);
+
+        ResteasyClient client = new ResteasyClientBuilder().httpEngine(engine).build();
+        clients.add(client);
+
+        client.register(RpcContextFilter.class);
+        for (String clazz : Constants.COMMA_SPLIT_PATTERN.split(url.getParameter(Constants.EXTENSION_KEY, ""))) {
+            if (!StringUtils.isEmpty(clazz)) {
+                try {
+                    client.register(Thread.currentThread().getContextClassLoader().loadClass(clazz.trim()));
+                } catch (ClassNotFoundException e) {
+                    throw new RpcException("Error loading JAX-RS extension class: " + clazz.trim(), e);
+                }
+            }
+        }
+
+        // TODO protocol
+        ResteasyWebTarget target = client.target("http://" + url.getHost() + ":" + url.getPort() + "/" + getContextPath(url));
+        return target.proxy(serviceType);
+    }
+
+    protected int getErrorCode(Throwable e) {
+        // TODO
+        return super.getErrorCode(e);
+    }
+
+    public void destroy() {
+        super.destroy();
+
+        if (connectionMonitor != null) {
+            connectionMonitor.shutdown();
+        }
+
+        for (Map.Entry<String, RestServer> entry : servers.entrySet()) {
+            try {
+                if (logger.isInfoEnabled()) {
+                    logger.info("Closing the rest server at " + entry.getKey());
+                }
+                entry.getValue().stop();
+            } catch (Throwable t) {
+                logger.warn("Error closing rest server", t);
+            }
+        }
+        servers.clear();
+
+        if (logger.isInfoEnabled()) {
+            logger.info("Closing rest clients");
+        }
+        for (ResteasyClient client : clients) {
+            try {
+                client.close();
+            } catch (Throwable t) {
+                logger.warn("Error closing rest client", t);
+            }
+        }
+        clients.clear();
+    }
+
+    protected String getContextPath(URL url) {
+        int pos = url.getPath().lastIndexOf("/");
+        return pos > 0 ? url.getPath().substring(0, pos) : "";
+    }
+
+    protected class ConnectionMonitor extends Thread {
+        private volatile boolean shutdown;
+        private final List<ClientConnectionManager> connectionManagers = Collections.synchronizedList(new LinkedList<ClientConnectionManager>());
+
+        public void addConnectionManager(ClientConnectionManager connectionManager) {
+            connectionManagers.add(connectionManager);
+        }
+
+        public void run() {
+            try {
+                while (!shutdown) {
+                    synchronized (this) {
+                        wait(1000);
+                        for (ClientConnectionManager connectionManager : connectionManagers) {
+                            connectionManager.closeExpiredConnections();
+                            // TODO constant
+                            connectionManager.closeIdleConnections(30, TimeUnit.SECONDS);
+                        }
+                    }
+                }
+            } catch (InterruptedException ex) {
+                shutdown();
+            }
+        }
+
+        public void shutdown() {
+            shutdown = true;
+            connectionManagers.clear();
+            synchronized (this) {
+                notifyAll();
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestServer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestServer.java
new file mode 100644
index 0000000000..cc989550a0
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestServer.java
@@ -0,0 +1,35 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.common.URL;
+
+/**
+ * @author lishen
+ */
+public interface RestServer {
+
+    void start(URL url);
+
+    /**
+     * @param resourceDef it could be either resource interface or resource impl
+     */
+    void deploy(Class resourceDef, Object resourceInstance, String contextPath);
+
+    void undeploy(Class resourceDef);
+
+    void stop();
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestServerFactory.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestServerFactory.java
new file mode 100644
index 0000000000..0b7c9b3873
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RestServerFactory.java
@@ -0,0 +1,48 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.remoting.http.HttpBinder;
+
+/**
+ * Only the server that implements servlet container
+ * could support something like @Context injection of servlet objects.
+ *
+ * @author lishen
+ */
+public class RestServerFactory {
+
+    private HttpBinder httpBinder;
+
+    public void setHttpBinder(HttpBinder httpBinder) {
+        this.httpBinder = httpBinder;
+    }
+
+    public RestServer createServer(String name) {
+        // TODO move names to Constants
+        if ("servlet".equalsIgnoreCase(name) || "jetty".equalsIgnoreCase(name) || "tomcat".equalsIgnoreCase(name)) {
+            return new DubboHttpServer(httpBinder);
+//        } else if ("tjws".equalsIgnoreCase(name)) {
+//            return new TjwsServer();
+        } else if ("netty".equalsIgnoreCase(name)) {
+            return new NettyServer();
+        } else if ("sunhttp".equalsIgnoreCase(name)) {
+            return new SunHttpServer();
+        } else {
+            throw new IllegalArgumentException("Unrecognized server name: " + name);
+        }
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RpcContextFilter.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RpcContextFilter.java
new file mode 100644
index 0000000000..5c678d964b
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RpcContextFilter.java
@@ -0,0 +1,90 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.common.utils.StringUtils;
+import com.alibaba.dubbo.rpc.RpcContext;
+import org.jboss.resteasy.spi.ResteasyProviderFactory;
+
+import javax.annotation.Priority;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.ws.rs.client.ClientRequestContext;
+import javax.ws.rs.client.ClientRequestFilter;
+import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.container.ContainerRequestFilter;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * @author lishen
+ */
+@Priority(Integer.MIN_VALUE + 1)
+public class RpcContextFilter implements ContainerRequestFilter, ClientRequestFilter {
+
+    private static final String DUBBO_ATTACHMENT_HEADER = "Dubbo-Attachments";
+
+    // currently we use a single header to hold the attachments so that the total attachment size limit is about 8k
+    private static final int MAX_HEADER_SIZE = 8 * 1024;
+
+    public void filter(ContainerRequestContext requestContext) throws IOException {
+        HttpServletRequest request = ResteasyProviderFactory.getContextData(HttpServletRequest.class);
+        RpcContext.getContext().setRequest(request);
+
+        // this only works for servlet containers
+        if (request != null && RpcContext.getContext().getRemoteAddress() == null) {
+            RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
+        }
+
+        RpcContext.getContext().setResponse(ResteasyProviderFactory.getContextData(HttpServletResponse.class));
+
+        String headers = requestContext.getHeaderString(DUBBO_ATTACHMENT_HEADER);
+        if (headers != null) {
+            for (String header : headers.split(",")) {
+                int index = header.indexOf("=");
+                if (index > 0) {
+                    String key = header.substring(0, index);
+                    String value = header.substring(index + 1);
+                    if (!StringUtils.isEmpty(key)) {
+                        RpcContext.getContext().setAttachment(key.trim(), value.trim());
+                    }
+                }
+            }
+        }
+    }
+
+    public void filter(ClientRequestContext requestContext) throws IOException {
+        int size = 0;
+        for (Map.Entry<String, String> entry : RpcContext.getContext().getAttachments().entrySet()) {
+            if (entry.getValue().contains(",") || entry.getValue().contains("=")
+                    || entry.getKey().contains(",") || entry.getKey().contains("=")) {
+                throw new IllegalArgumentException("The attachments of " + RpcContext.class.getSimpleName() + " must not contain ',' or '=' when using rest protocol");
+            }
+
+            // TODO for now we don't consider the differences of encoding and server limit
+            size += entry.getValue().getBytes("UTF-8").length;
+            if (size > MAX_HEADER_SIZE) {
+                throw new IllegalArgumentException("The attachments of " + RpcContext.class.getSimpleName() + " is too big");
+            }
+
+            StringBuilder attachments = new StringBuilder();
+            attachments.append(entry.getKey());
+            attachments.append("=");
+            attachments.append(entry.getValue());
+            requestContext.getHeaders().add(DUBBO_ATTACHMENT_HEADER, attachments.toString());
+        }
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RpcExceptionMapper.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RpcExceptionMapper.java
new file mode 100644
index 0000000000..3b0cc31dca
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/RpcExceptionMapper.java
@@ -0,0 +1,52 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.rpc.RpcException;
+import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+
+/**
+ * @author lishen
+ */
+public class RpcExceptionMapper implements ExceptionMapper<RpcException> {
+
+    public Response toResponse(RpcException e) {
+        // TODO do more sophisticated exception handling and output
+        if (e.getCause() instanceof ConstraintViolationException) {
+            return handleConstraintViolationException((ConstraintViolationException) e.getCause());
+        }
+        // we may want to avoid exposing the dubbo exception details to certain clients
+        // TODO for now just do plain text output
+        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity("Internal server error: " + e.getMessage()).type(ContentType.TEXT_PLAIN_UTF_8).build();
+    }
+
+    protected Response handleConstraintViolationException(ConstraintViolationException cve) {
+        ViolationReport report = new ViolationReport();
+        for (ConstraintViolation cv : cve.getConstraintViolations()) {
+            report.addConstraintViolation(new RestConstraintViolation(
+                    cv.getPropertyPath().toString(),
+                    cv.getMessage(),
+                    cv.getInvalidValue() == null ? "null" : cv.getInvalidValue().toString()));
+        }
+        // TODO for now just do xml output
+        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(report).type(ContentType.TEXT_XML_UTF_8).build();
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/SunHttpServer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/SunHttpServer.java
new file mode 100644
index 0000000000..7e4e51a1e1
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/SunHttpServer.java
@@ -0,0 +1,41 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.common.URL;
+import org.jboss.resteasy.plugins.server.sun.http.SunHttpJaxrsServer;
+import org.jboss.resteasy.spi.ResteasyDeployment;
+
+/**
+ * @author lishen
+ */
+public class SunHttpServer extends BaseRestServer {
+
+    private final SunHttpJaxrsServer server = new SunHttpJaxrsServer();
+
+    protected void doStart(URL url) {
+        server.setPort(url.getPort());
+        server.start();
+    }
+
+    public void stop() {
+        server.stop();
+    }
+
+    protected ResteasyDeployment getDeployment() {
+        return server.getDeployment();
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/TjwsServer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/TjwsServer.java
new file mode 100644
index 0000000000..3a5e7c5a8a
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/TjwsServer.java
@@ -0,0 +1,45 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import com.alibaba.dubbo.common.URL;
+import org.jboss.resteasy.spi.ResteasyDeployment;
+
+/**
+ * @author lishen
+ */
+public class TjwsServer extends BaseRestServer {
+
+//    private final TJWSEmbeddedJaxrsServer server = new TJWSEmbeddedJaxrsServer();
+
+    protected void doStart(URL url) {
+        throw new UnsupportedOperationException("TJWS server is now unsupported");
+//        server.setPort(url.getPort());
+//        // below config is useless due to a resteasy bug
+////        server.setKeepAlive(false);
+//        server.start();
+    }
+
+    protected ResteasyDeployment getDeployment() {
+        throw new UnsupportedOperationException("TJWS server is now unsupported");
+//        return server.getDeployment();
+    }
+
+    public void stop() {
+        throw new UnsupportedOperationException("TJWS server is now unsupported");
+//        server.stop();
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/UndertowServer.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/UndertowServer.java
new file mode 100644
index 0000000000..d8d7ff0602
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/UndertowServer.java
@@ -0,0 +1,68 @@
+/**
+ * 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.rpc.protocol.rest;
+
+//import com.alibaba.dubbo.common.URL;
+//import com.alibaba.dubbo.common.utils.StringUtils;
+//import io.undertow.Undertow;
+//import io.undertow.servlet.api.DeploymentInfo;
+//import org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer;
+//import org.jboss.resteasy.spi.ResteasyDeployment;
+
+/**
+ * TODO this impl hasn't been well tested, and we can consider move undertow to a general remoting-http impl in the future
+ *
+ * @author lishen
+ */
+public class UndertowServer /*implements RestServer*/ {
+
+//    // Note that UndertowJaxrsServer doesn't implement EmbeddedJaxrsServer
+//
+//    private final ResteasyDeployment deployment = new ResteasyDeployment();
+//
+//    private final UndertowJaxrsServer server = new UndertowJaxrsServer();
+//
+//    public void start(URL url) {
+//        deployment.start();
+//        DeploymentInfo deploymentInfo = server.undertowDeployment(deployment);
+//        deploymentInfo.setContextPath("/");
+//        deploymentInfo.setDeploymentName("dubbo-rest");
+//        deploymentInfo.setClassLoader(Thread.currentThread().getContextClassLoader());
+//        server.deploy(deploymentInfo);
+//        server.start(Undertow.builder().addHttpListener(url.getPort(), url.getHost()));
+//    }
+//
+//    public void deploy(Class resourceDef, Object resourceInstance, String contextPath) {
+//        if (StringUtils.isEmpty(contextPath)) {
+//            deployment.getRegistry().addResourceFactory(new DubboResourceFactory(resourceInstance, resourceDef));
+//        } else {
+//            deployment.getRegistry().addResourceFactory(new DubboResourceFactory(resourceInstance, resourceDef), contextPath);
+//        }
+//    }
+//
+//    public void undeploy(Class resourceDef) {
+//        deployment.getRegistry().removeRegistrations(resourceDef);
+//    }
+//
+//    public void deploy(Class resourceDef, Object resourceInstance) {
+//        deploy(resourceDef, resourceInstance, "/");
+//    }
+//
+//    public void stop() {
+//        deployment.stop();
+//        server.stop();
+//    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/ViolationReport.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/ViolationReport.java
new file mode 100644
index 0000000000..4fa6e5dd08
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/ViolationReport.java
@@ -0,0 +1,50 @@
+/**
+ * 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.rpc.protocol.rest;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement(name="violationReport")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class ViolationReport implements Serializable {
+
+    private static final long serialVersionUID = -130498234L;
+
+    private List<RestConstraintViolation> constraintViolations;
+
+    public List<RestConstraintViolation> getConstraintViolations() {
+        return constraintViolations;
+    }
+
+    public void setConstraintViolations(List<RestConstraintViolation> constraintViolations) {
+        this.constraintViolations = constraintViolations;
+    }
+
+    public void addConstraintViolation(RestConstraintViolation constraintViolation) {
+        if (constraintViolations == null) {
+            constraintViolations = new LinkedList<RestConstraintViolation>();
+        }
+        constraintViolations.add(constraintViolation);
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/support/ContentType.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/support/ContentType.java
new file mode 100644
index 0000000000..d388748134
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/support/ContentType.java
@@ -0,0 +1,28 @@
+/**
+ * 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.rpc.protocol.rest.support;
+
+import javax.ws.rs.core.MediaType;
+
+/**
+ * @author lishen
+ */
+public class ContentType {
+
+    public static final String APPLICATION_JSON_UTF_8 = MediaType.APPLICATION_JSON + "; " + MediaType.CHARSET_PARAMETER + "=UTF-8";
+    public static final String TEXT_XML_UTF_8 = MediaType.TEXT_XML + "; " + MediaType.CHARSET_PARAMETER + "=UTF-8";
+    public static final String TEXT_PLAIN_UTF_8 = MediaType.TEXT_PLAIN + "; " + MediaType.CHARSET_PARAMETER + "=UTF-8";
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/support/LoggingFilter.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/support/LoggingFilter.java
new file mode 100644
index 0000000000..92b1b44053
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/com/alibaba/dubbo/rpc/protocol/rest/support/LoggingFilter.java
@@ -0,0 +1,141 @@
+/**
+ * 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.rpc.protocol.rest.support;
+
+import com.alibaba.dubbo.common.logger.Logger;
+import com.alibaba.dubbo.common.logger.LoggerFactory;
+import org.apache.commons.io.IOUtils;
+
+import javax.annotation.Priority;
+import javax.ws.rs.Priorities;
+import javax.ws.rs.WebApplicationException;
+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 javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.container.ContainerRequestFilter;
+import javax.ws.rs.container.ContainerResponseContext;
+import javax.ws.rs.container.ContainerResponseFilter;
+import javax.ws.rs.core.MultivaluedMap;
+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.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This logging filter is not highly optimized for now
+ *
+ * @author lishen
+ */
+@Priority(Integer.MIN_VALUE)
+public class LoggingFilter implements ContainerRequestFilter, ClientRequestFilter, ContainerResponseFilter, ClientResponseFilter, WriterInterceptor, ReaderInterceptor {
+
+    private static final Logger logger = LoggerFactory.getLogger(LoggingFilter.class);
+
+    public void filter(ClientRequestContext context) throws IOException {
+        logHttpHeaders(context.getStringHeaders());
+    }
+
+    public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) throws IOException {
+        logHttpHeaders(responseContext.getHeaders());
+    }
+
+    public void filter(ContainerRequestContext context) throws IOException {
+        logHttpHeaders(context.getHeaders());
+    }
+
+    public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException {
+        logHttpHeaders(responseContext.getStringHeaders());
+    }
+
+    public Object aroundReadFrom(ReaderInterceptorContext context) throws IOException, WebApplicationException {
+        byte[] buffer = IOUtils.toByteArray(context.getInputStream());
+        logger.info("The contents of request body is: \n" + new String(buffer, "UTF-8") + "\n");
+        context.setInputStream(new ByteArrayInputStream(buffer));
+        return context.proceed();
+    }
+
+    public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException {
+        OutputStreamWrapper wrapper = new OutputStreamWrapper(context.getOutputStream());
+        context.setOutputStream(wrapper);
+        context.proceed();
+        logger.info("The contents of response body is: \n" + new String(wrapper.getBytes(), "UTF-8") + "\n");
+    }
+
+    protected void logHttpHeaders(MultivaluedMap<String, String> headers) {
+        StringBuilder msg = new StringBuilder("The HTTP headers are: \n");
+        for (Map.Entry<String, List<String>> entry : headers.entrySet()) {
+            msg.append(entry.getKey()).append(": ");
+            for (int i = 0; i < entry.getValue().size(); i++) {
+                msg.append(entry.getValue().get(i));
+                if (i < entry.getValue().size() - 1) {
+                    msg.append(", ");
+                }
+            }
+            msg.append("\n");
+        }
+        logger.info(msg.toString());
+    }
+
+    protected static class OutputStreamWrapper extends OutputStream {
+
+        private final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+        private final OutputStream output;
+
+        private OutputStreamWrapper(OutputStream output) {
+            this.output = output;
+        }
+
+        @Override
+        public void write(int i) throws IOException {
+            buffer.write(i);
+            output.write(i);
+        }
+
+        @Override
+        public void write(byte[] b) throws IOException {
+            buffer.write(b);
+            output.write(b);
+        }
+
+        @Override
+        public void write(byte[] b, int off, int len) throws IOException {
+            buffer.write(b, off, len);
+            output.write(b, off, len);
+        }
+
+        @Override
+        public void flush() throws IOException {
+            output.flush();
+        }
+
+        @Override
+        public void close() throws IOException {
+            output.close();
+        }
+
+        public byte[] getBytes() {
+            return buffer.toByteArray();
+        }
+    }
+}
diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol b/dubbo-rpc/dubbo-rpc-rest/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
new file mode 100644
index 0000000000..a0f05272d0
--- /dev/null
+++ b/dubbo-rpc/dubbo-rpc-rest/src/main/resources/META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol
@@ -0,0 +1 @@
+rest=com.alibaba.dubbo.rpc.protocol.rest.RestProtocol
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-rmi/pom.xml b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
index ef5e72215b..84b76b9a05 100644
--- a/dubbo-rpc/dubbo-rpc-rmi/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-rmi/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-rmi</artifactId>
 	<packaging>jar</packaging>
@@ -36,9 +36,7 @@
 		</dependency>
 		<dependency>
 			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-			<scope>provided</scope>
-			<optional>true</optional>
+			<artifactId>spring-context</artifactId>
 		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-rpc/dubbo-rpc-thrift/pom.xml b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
index b632539bee..4b5d5d075e 100644
--- a/dubbo-rpc/dubbo-rpc-thrift/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-thrift/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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.
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-thrift</artifactId>
 	<packaging>jar</packaging>
@@ -52,13 +52,17 @@
 		<dependency>
 			<groupId>org.apache.thrift</groupId>
 			<artifactId>libthrift</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpcore</artifactId>
+                </exclusion>
+            </exclusions>
 		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-			<scope>provided</scope>
-			<optional>true</optional>
-		</dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>dubbo-config-spring</artifactId>
diff --git a/dubbo-rpc/dubbo-rpc-webservice/pom.xml b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
index 2e38db44a6..069d285b43 100644
--- a/dubbo-rpc/dubbo-rpc-webservice/pom.xml
+++ b/dubbo-rpc/dubbo-rpc-webservice/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-rpc</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc-webservice</artifactId>
 	<packaging>jar</packaging>
@@ -47,11 +47,5 @@
 			<groupId>org.apache.cxf</groupId>
 			<artifactId>cxf-rt-transports-http</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-			<scope>provided</scope>
-			<optional>true</optional>
-		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file
diff --git a/dubbo-rpc/pom.xml b/dubbo-rpc/pom.xml
index f2ec70b583..4dd07112ac 100644
--- a/dubbo-rpc/pom.xml
+++ b/dubbo-rpc/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-rpc</artifactId>
 	<packaging>pom</packaging>
@@ -39,5 +39,6 @@
 		<module>dubbo-rpc-thrift</module>
 		<module>dubbo-rpc-memcached</module>
 		<module>dubbo-rpc-redis</module>
+		<module>dubbo-rpc-rest</module>
 	</modules>
 </project>
diff --git a/dubbo-simple/dubbo-monitor-simple/pom.xml b/dubbo-simple/dubbo-monitor-simple/pom.xml
index ece10d4210..4068dfc52f 100644
--- a/dubbo-simple/dubbo-monitor-simple/pom.xml
+++ b/dubbo-simple/dubbo-monitor-simple/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-simple</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-monitor-simple</artifactId>
 	<packaging>jar</packaging>
@@ -38,16 +38,12 @@
 			<groupId>jfree</groupId>
 			<artifactId>jfreechart</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.springframework</groupId>
-			<artifactId>spring</artifactId>
-		</dependency>
 		<dependency>
 			<groupId>org.javassist</groupId>
 			<artifactId>javassist</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>org.jboss.netty</groupId>
+			<groupId>io.netty</groupId>
 			<artifactId>netty</artifactId>
 		</dependency>
 		<dependency>
@@ -83,7 +79,7 @@
 			<artifactId>zkclient</artifactId>
 		</dependency>
 		<dependency>
-			<groupId>com.netflix.curator</groupId>
+			<groupId>org.apache.curator</groupId>
 			<artifactId>curator-framework</artifactId>
 		</dependency>
 		<dependency>
@@ -108,7 +104,7 @@
 		</dependency>
 		<dependency>
 			<groupId>javax.servlet</groupId>
-			<artifactId>servlet-api</artifactId>
+			<artifactId>javax.servlet-api</artifactId>
 		</dependency>
 		<dependency>
 			<groupId>org.mortbay.jetty</groupId>
diff --git a/dubbo-simple/dubbo-monitor-simple/src/test/resources/dubbo.properties b/dubbo-simple/dubbo-monitor-simple/src/test/resources/dubbo.properties
index 8ee345a318..b82dc04593 100644
--- a/dubbo-simple/dubbo-monitor-simple/src/test/resources/dubbo.properties
+++ b/dubbo-simple/dubbo-monitor-simple/src/test/resources/dubbo.properties
@@ -16,7 +16,9 @@
 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
diff --git a/dubbo-simple/dubbo-registry-simple/pom.xml b/dubbo-simple/dubbo-registry-simple/pom.xml
index 4de8766a16..6c1912bee6 100644
--- a/dubbo-simple/dubbo-registry-simple/pom.xml
+++ b/dubbo-simple/dubbo-registry-simple/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-simple</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-registry-simple</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-simple/pom.xml b/dubbo-simple/pom.xml
index 523164e392..5bb270f017 100644
--- a/dubbo-simple/pom.xml
+++ b/dubbo-simple/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-simple</artifactId>
 	<packaging>pom</packaging>
diff --git a/dubbo-test/dubbo-test-benchmark-api/pom.xml b/dubbo-test/dubbo-test-benchmark-api/pom.xml
new file mode 100644
index 0000000000..79f9a30036
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/pom.xml
@@ -0,0 +1,32 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.alibaba</groupId>
+		<artifactId>dubbo-test</artifactId>
+		<version>2.8.4</version>
+	</parent>
+	<artifactId>dubbo-test-benchmark-api</artifactId>
+	<packaging>jar</packaging>
+	<name>${project.artifactId}</name>
+	<description>The benchmark test module of dubbo project</description>
+	<properties>
+		<skip_maven_deploy>true</skip_maven_deploy>
+	</properties>
+    <dependencies>
+    <dependency>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-common</artifactId>
+        <version>${project.parent.version}</version>
+    </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-rest</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidRequest.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidRequest.java
new file mode 100644
index 0000000000..0073d0ba00
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidRequest.java
@@ -0,0 +1,57 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement
+public class BidRequest implements Serializable {
+
+   private String id;
+
+    private Device device;
+
+    private List<Impression> 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<Impression> getImpressions() {
+        return impressions;
+    }
+
+    public void setImpressions(List<Impression> impressions) {
+        this.impressions = impressions;
+    }
+}
diff --git a/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidResponse.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidResponse.java
new file mode 100644
index 0000000000..b38f1507f4
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidResponse.java
@@ -0,0 +1,46 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement
+public class BidResponse implements Serializable {
+
+    private String id;
+    private List<SeatBid> seatBids;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public List<SeatBid> getSeatBids() {
+        return seatBids;
+    }
+
+    public void setSeatBids(List<SeatBid> seatBids) {
+        this.seatBids = seatBids;
+    }
+}
diff --git a/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Device.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Device.java
new file mode 100644
index 0000000000..c99b00e439
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Device.java
@@ -0,0 +1,81 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement
+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-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoService.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoService.java
new file mode 100644
index 0000000000..1d735918ad
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoService.java
@@ -0,0 +1,40 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+@Path("echo")
+@Consumes({MediaType.APPLICATION_JSON})
+//@Consumes({MediaType.TEXT_XML})
+@Produces({MediaType.APPLICATION_JSON})
+//@Produces({MediaType.TEXT_XML})
+public interface EchoService {
+
+    @POST
+    @Path("bid")
+//    @GZIP
+    BidRequest bid(/*@GZIP */BidRequest request);
+
+    @POST
+    @Path("text")
+//    @GZIP
+    Text text(/*@GZIP */Text text);
+}
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Geo.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Geo.java
new file mode 100644
index 0000000000..2733c494e2
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Geo.java
@@ -0,0 +1,63 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement
+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-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Impression.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Impression.java
new file mode 100644
index 0000000000..9d7ac8f133
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Impression.java
@@ -0,0 +1,45 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement
+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-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SeatBid.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SeatBid.java
new file mode 100644
index 0000000000..8132e267c5
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SeatBid.java
@@ -0,0 +1,46 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement
+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-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SerializationOptimizerImpl.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SerializationOptimizerImpl.java
new file mode 100644
index 0000000000..ba7aa3fcb2
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/SerializationOptimizerImpl.java
@@ -0,0 +1,41 @@
+/**
+ * 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.rpc.benchmark;
+
+import com.alibaba.dubbo.common.serialize.support.SerializationOptimizer;
+
+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<Class> getSerializableClasses() {
+        List<Class> classes = new LinkedList<Class>();
+        classes.add(BidRequest.class);
+        classes.add(BidResponse.class);
+        classes.add(Device.class);
+        classes.add(Geo.class);
+        classes.add(Impression.class);
+        classes.add(SeatBid.class);
+        return classes;
+    }
+}
diff --git a/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Text.java b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Text.java
new file mode 100644
index 0000000000..077ffdda5d
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-api/src/main/java/com/alibaba/dubbo/rpc/benchmark/Text.java
@@ -0,0 +1,43 @@
+/**
+ * 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.rpc.benchmark;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+
+/**
+ * @author lishen
+ */
+@XmlRootElement
+public class Text implements Serializable {
+
+    private String contents;
+
+    public Text() {
+    }
+
+    public Text(String contents) {
+        this.contents = contents;
+    }
+
+    public String getContents() {
+        return contents;
+    }
+
+    public void setContents(String contents) {
+        this.contents = contents;
+    }
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/pom.xml b/dubbo-test/dubbo-test-benchmark-client/pom.xml
new file mode 100644
index 0000000000..09aded7110
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/pom.xml
@@ -0,0 +1,200 @@
+<!--
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.alibaba</groupId>
+		<artifactId>dubbo-test</artifactId>
+		<version>2.8.4</version>
+	</parent>
+	<artifactId>dubbo-test-benchmark-client</artifactId>
+	<packaging>jar</packaging>
+	<name>${project.artifactId}</name>
+	<description>The benchmark test module of dubbo project</description>
+	<properties>
+		<skip_maven_deploy>true</skip_maven_deploy>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>dubbo</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-test-benchmark-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.0</version>
+            <!--<scope>provided</scope>-->
+        </dependency>
+	</dependencies>
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <excludes>
+                    <exclude>**/*.*</exclude>
+                </excludes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.alibaba</groupId>
+                                    <artifactId>dubbo</artifactId>
+                                    <version>${project.parent.version}</version>
+                                    <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
+                                    <includes>META-INF/assembly/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptor>src/assembly/assembly.xml</descriptor>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/assembly/assembly.xml b/dubbo-test/dubbo-test-benchmark-client/src/assembly/assembly.xml
new file mode 100644
index 0000000000..0617798a70
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/assembly/assembly.xml
@@ -0,0 +1,23 @@
+<assembly>
+    <id>assembly</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>src/cli</directory>
+            <outputDirectory>/</outputDirectory>
+            <fileMode>0755</fileMode>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/resources</directory>
+            <outputDirectory>conf</outputDirectory>
+        </fileSet>
+    </fileSets>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>lib</outputDirectory>
+        </dependencySet>
+    </dependencySets>
+</assembly>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/cli/run.bat b/dubbo-test/dubbo-test-benchmark-client/src/cli/run.bat
new file mode 100644
index 0000000000..54b4406fa8
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/cli/run.bat
@@ -0,0 +1 @@
+java -Xms1g -Xmx1g -XX:PermSize=64M -XX:+UseConcMarkSweepGC -Djava.ext.dirs=lib -classpath conf com.alibaba.dubbo.rpc.benchmark.RpcBenchmarkClient > benchmark.log
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/cli/run.sh b/dubbo-test/dubbo-test-benchmark-client/src/cli/run.sh
new file mode 100644
index 0000000000..7389f902f9
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/cli/run.sh
@@ -0,0 +1 @@
+java -Xms1g -Xmx1g -XX:PermSize=64M -XX:+UseConcMarkSweepGC -Djava.ext.dirs=./lib -classpath conf com.alibaba.dubbo.rpc.benchmark.RpcBenchmarkClient  > "benchmark.log" 2>&1
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkClient.java b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkClient.java
new file mode 100644
index 0000000000..63dbf9783e
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractBenchmarkClient.java
@@ -0,0 +1,251 @@
+package com.alibaba.dubbo.rpc.benchmark;
+
+/**
+ * nfs-rpc
+ *   Apache License
+ *   
+ *   http://code.google.com/p/nfs-rpc (c) 2011
+ */
+import java.io.BufferedWriter;
+import java.io.FileInputStream;
+import java.io.FileWriter;
+import java.lang.reflect.InvocationTargetException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+
+import com.alibaba.dubbo.common.utils.ConfigUtils;
+
+/**
+ * Abstract benchmark client,test for difference scenes Usage: -Dwrite.statistics=false BenchmarkClient serverIP
+ * serverPort concurrents timeout codectype requestSize runtime(seconds) clientNums
+ * 
+ * @author <a href="mailto:bluedavy@gmail.com">bluedavy</a>
+ */
+public abstract class AbstractBenchmarkClient {
+
+    private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+    private static long                   maxTPS     = 0;
+
+    private static long                   minTPS     = 0;
+
+    private static long                   allRequestSum;
+
+    private static long                   allResponseTimeSum;
+
+    private static long                   allErrorRequestSum;
+
+    private static long                   allErrorResponseTimeSum;
+
+    private static int                    runtime;
+
+    // < 0
+    private static long                   below0sum;
+
+    // (0,1]
+    private static long                   above0sum;
+
+    // (1,5]
+    private static long                   above1sum;
+
+    // (5,10]
+    private static long                   above5sum;
+
+    // (10,50]
+    private static long                   above10sum;
+
+    // (50,100]
+    private static long                   above50sum;
+
+    // (100,500]
+    private static long                   above100sum;
+
+    // (500,1000]
+    private static long                   above500sum;
+
+    // > 1000
+    private static long                   above1000sum;
+
+    Properties                            properties = ConfigUtils.getProperties();
+
+    public void run(String[] args) throws Exception {
+
+        final String serverIP = properties.getProperty("serverip");
+        final int serverPort = Integer.parseInt(properties.getProperty("serverport"));
+        final int concurrents = Integer.parseInt(properties.getProperty("concurrents"));
+        final int timeout = Integer.parseInt(properties.getProperty("timeout"));
+        runtime = Integer.parseInt(properties.getProperty("runtime"));
+        final long endtime = System.nanoTime() / 1000L + runtime * 1000 * 1000L;
+        final int clientNums = Integer.parseInt(properties.getProperty("connectionnums"));
+        final String protocol =properties.getProperty("protocol");
+        final String serialization =properties.getProperty("serialization");
+
+        // Print start info
+        Date currentDate = new Date();
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(currentDate);
+        calendar.add(Calendar.SECOND, runtime);
+        StringBuilder startInfo = new StringBuilder(dateFormat.format(currentDate));
+        startInfo.append(" ready to start client benchmark,server is ");
+        startInfo.append(serverIP).append(":").append(serverPort);
+        startInfo.append(",protocol is: ").append(protocol);
+        startInfo.append(",serialization is: ").append(serialization);
+        startInfo.append(",concurrents is: ").append(concurrents);
+        startInfo.append(",clientNums is: ").append(clientNums);
+        startInfo.append(",timeout is:").append(timeout);
+        startInfo.append(" s,the benchmark will end at:").append(dateFormat.format(calendar.getTime()));
+        System.out.println(startInfo.toString());
+
+        CyclicBarrier barrier = new CyclicBarrier(concurrents);
+        CountDownLatch latch = new CountDownLatch(concurrents);
+        List<ClientRunnable> runnables = new ArrayList<ClientRunnable>();
+        // benchmark start after thirty seconds,let java app warm up
+        long beginTime = System.nanoTime() / 1000L + 30 * 1000 * 1000L;
+        for (int i = 0; i < concurrents; i++) {
+            ClientRunnable runnable = getClientRunnable(protocol, serialization, serverIP, serverPort, clientNums, timeout, barrier, latch,
+                                                        beginTime, endtime);
+            runnables.add(runnable);
+        }
+
+        startRunnables(runnables);
+
+        latch.await();
+
+        // read results & add all
+        // key: runtime second range value: Long[2] array Long[0]: execute count Long[1]: response time sum
+        Map<String, Long[]> times = new HashMap<String, Long[]>();
+        Map<String, Long[]> errorTimes = new HashMap<String, Long[]>();
+        for (ClientRunnable runnable : runnables) {
+            List<long[]> results = runnable.getResults();
+            long[] responseSpreads = results.get(0);
+            below0sum += responseSpreads[0];
+            above0sum += responseSpreads[1];
+            above1sum += responseSpreads[2];
+            above5sum += responseSpreads[3];
+            above10sum += responseSpreads[4];
+            above50sum += responseSpreads[5];
+            above100sum += responseSpreads[6];
+            above500sum += responseSpreads[7];
+            above1000sum += responseSpreads[8];
+            long[] tps = results.get(1);
+            long[] responseTimes = results.get(2);
+            long[] errorTPS = results.get(3);
+            long[] errorResponseTimes = results.get(4);
+            for (int i = 0; i < tps.length; i++) {
+                String key = String.valueOf(i);
+                if (times.containsKey(key)) {
+                    Long[] successInfos = times.get(key);
+                    Long[] errorInfos = errorTimes.get(key);
+                    successInfos[0] += tps[i];
+                    successInfos[1] += responseTimes[i];
+                    errorInfos[0] += errorTPS[i];
+                    errorInfos[1] += errorResponseTimes[i];
+                    times.put(key, successInfos);
+                    errorTimes.put(key, errorInfos);
+                } else {
+                    Long[] successInfos = new Long[2];
+                    successInfos[0] = tps[i];
+                    successInfos[1] = responseTimes[i];
+                    Long[] errorInfos = new Long[2];
+                    errorInfos[0] = errorTPS[i];
+                    errorInfos[1] = errorResponseTimes[i];
+                    times.put(key, successInfos);
+                    errorTimes.put(key, errorInfos);
+                }
+            }
+        }
+
+        long ignoreRequest = 0;
+        long ignoreErrorRequest = 0;
+        int maxTimeRange = runtime - 30;
+        // ignore the last 10 second requests,so tps can count more accurate
+        for (int i = 0; i < 10; i++) {
+            Long[] values = times.remove(String.valueOf(maxTimeRange - i));
+            if (values != null) {
+                ignoreRequest += values[0];
+            }
+            Long[] errorValues = errorTimes.remove(String.valueOf(maxTimeRange - i));
+            if (errorValues != null) {
+                ignoreErrorRequest += errorValues[0];
+            }
+        }
+
+        for (Map.Entry<String, Long[]> entry : times.entrySet()) {
+            long successRequest = entry.getValue()[0];
+            long errorRequest = 0;
+            if (errorTimes.containsKey(entry.getKey())) {
+                errorRequest = errorTimes.get(entry.getKey())[0];
+            }
+            allRequestSum += successRequest;
+            allResponseTimeSum += entry.getValue()[1];
+            allErrorRequestSum += errorRequest;
+            if (errorTimes.containsKey(entry.getKey())) {
+                allErrorResponseTimeSum += errorTimes.get(entry.getKey())[1];
+            }
+            long currentRequest = successRequest + errorRequest;
+            if (currentRequest > maxTPS) {
+                maxTPS = currentRequest;
+            }
+            if (minTPS == 0 || currentRequest < minTPS) {
+                minTPS = currentRequest;
+            }
+        }
+
+        boolean isWriteResult = Boolean.parseBoolean(System.getProperty("write.statistics", "false"));
+        if (isWriteResult) {
+            BufferedWriter writer = new BufferedWriter(new FileWriter("benchmark.all.results"));
+            for (Map.Entry<String, Long[]> entry : times.entrySet()) {
+                writer.write(entry.getKey() + "," + entry.getValue()[0] + "," + entry.getValue()[1] + "\r\n");
+            }
+            writer.close();
+        }
+
+        System.out.println("----------Benchmark Statistics--------------");
+        System.out.println(" Concurrents: " + concurrents);
+        System.out.println(" ClientNums: " + clientNums);
+        System.out.println(" Runtime: " + runtime + " seconds");
+        System.out.println(" Benchmark Time: " + times.keySet().size());
+        long benchmarkRequest = allRequestSum + allErrorRequestSum;
+        long allRequest = benchmarkRequest + ignoreRequest + ignoreErrorRequest;
+        System.out.println(" Requests: " + allRequest + " Success: " + (allRequestSum + ignoreRequest) * 100
+                           / allRequest + "% (" + (allRequestSum + ignoreRequest) + ") Error: "
+                           + (allErrorRequestSum + ignoreErrorRequest) * 100 / allRequest + "% ("
+                           + (allErrorRequestSum + ignoreErrorRequest) + ")");
+        System.out.println(" Avg TPS: " + benchmarkRequest / times.keySet().size() + " Max TPS: " + maxTPS
+                           + " Min TPS: " + minTPS);
+        System.out.println(" Avg RT: " + (allErrorResponseTimeSum + allResponseTimeSum) / benchmarkRequest / 1000f
+                           + "ms");
+        System.out.println(" RT <= 0: " + (below0sum * 100 / allRequest) + "% " + below0sum + "/" + allRequest);
+        System.out.println(" RT (0,1]: " + (above0sum * 100 / allRequest) + "% " + above0sum + "/" + allRequest);
+        System.out.println(" RT (1,5]: " + (above1sum * 100 / allRequest) + "% " + above1sum + "/" + allRequest);
+        System.out.println(" RT (5,10]: " + (above5sum * 100 / allRequest) + "% " + above5sum + "/" + allRequest);
+        System.out.println(" RT (10,50]: " + (above10sum * 100 / allRequest) + "% " + above10sum + "/" + allRequest);
+        System.out.println(" RT (50,100]: " + (above50sum * 100 / allRequest) + "% " + above50sum + "/" + allRequest);
+        System.out.println(" RT (100,500]: " + (above100sum * 100 / allRequest) + "% " + above100sum + "/" + allRequest);
+        System.out.println(" RT (500,1000]: " + (above500sum * 100 / allRequest) + "% " + above500sum + "/"
+                           + allRequest);
+        System.out.println(" RT > 1000: " + (above1000sum * 100 / allRequest) + "% " + above1000sum + "/" + allRequest);
+        System.exit(0);
+    }
+
+    public abstract ClientRunnable getClientRunnable(String protocol, String serialization, String targetIP, int targetPort, int clientNums, int rpcTimeout,
+                                                     CyclicBarrier barrier, CountDownLatch latch, long startTime,
+                                                     long endTime) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException;
+
+    protected void startRunnables(List<ClientRunnable> runnables) {
+        for (int i = 0; i < runnables.size(); i++) {
+            final ClientRunnable runnable = runnables.get(i);
+            Thread thread = new Thread(runnable, "benchmarkclient-" + i);
+            thread.start();
+        }
+    }
+
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractClientRunnable.java b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractClientRunnable.java
new file mode 100644
index 0000000000..9df55a6799
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/AbstractClientRunnable.java
@@ -0,0 +1,176 @@
+package com.alibaba.dubbo.rpc.benchmark;
+
+/**
+ * nfs-rpc Apache License http://code.google.com/p/nfs-rpc (c) 2011
+ */
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Simple Processor RPC Benchmark Client Thread
+ * 
+ * @author <a href="mailto:bluedavy@gmail.com">bluedavy</a>
+ */
+public abstract class AbstractClientRunnable implements ClientRunnable {
+
+    private static final Log LOGGER             = LogFactory.getLog(AbstractClientRunnable.class);
+
+    private CyclicBarrier    barrier;
+
+    private CountDownLatch   latch;
+
+    private long             endTime;
+
+    private boolean          running            = true;
+
+    // response time spread
+    private long[]           responseSpreads    = new long[9];
+
+    // error request per second
+    private long[]           errorTPS           = null;
+
+    // error response times per second
+    private long[]           errorResponseTimes = null;
+
+    // tps per second
+    private long[]           tps                = null;
+
+    // response times per second
+    private long[]           responseTimes      = null;
+
+    // benchmark startTime
+    private long             startTime;
+
+    // benchmark maxRange
+    private int              maxRange;
+
+    private ServiceFactory   serviceFactory     = new ServiceFactory();
+
+    public AbstractClientRunnable(String protocol, String serialization, String targetIP, int targetPort, int clientNums, int rpcTimeout,
+                                  CyclicBarrier barrier, CountDownLatch latch, long startTime, long endTime){
+
+        this.barrier = barrier;
+        this.latch = latch;
+        this.startTime = startTime;
+        this.endTime = endTime;
+        serviceFactory.setProtocol(protocol);
+        serviceFactory.setTargetIP(targetIP);
+        serviceFactory.setClientNums(clientNums);
+        serviceFactory.setTargetPort(targetPort);
+        serviceFactory.setConnectTimeout(rpcTimeout);
+        serviceFactory.setSerialization(serialization);
+        maxRange = (Integer.parseInt(String.valueOf((endTime - startTime))) / 1000000) + 1;
+        errorTPS = new long[maxRange];
+        errorResponseTimes = new long[maxRange];
+        tps = new long[maxRange];
+        responseTimes = new long[maxRange];
+        // init
+        for (int i = 0; i < maxRange; i++) {
+            errorTPS[i] = 0;
+            errorResponseTimes[i] = 0;
+            tps[i] = 0;
+            responseTimes[i] = 0;
+        }
+    }
+
+    public void run() {
+        try {
+            barrier.await();
+        } catch (Exception e) {
+            // IGNORE
+        }
+        runJavaAndHessian();
+        latch.countDown();
+    }
+
+    private void runJavaAndHessian() {
+        while (running) {
+            long beginTime = System.nanoTime() / 1000L;
+            if (beginTime >= endTime) {
+                running = false;
+                break;
+            }
+            try {
+                Object result = invoke(serviceFactory);
+                long currentTime = System.nanoTime() / 1000L;
+                if (beginTime <= startTime) {
+                    continue;
+                }
+                long consumeTime = currentTime - beginTime;
+                sumResponseTimeSpread(consumeTime);
+                int range = Integer.parseInt(String.valueOf(beginTime - startTime)) / 1000000;
+                if (range >= maxRange) {
+                    System.err.println("benchmark range exceeds maxRange,range is: " + range + ",maxRange is: "
+                                       + maxRange);
+                    continue;
+                }
+                if (result != null) {
+                    tps[range] = tps[range] + 1;
+                    responseTimes[range] = responseTimes[range] + consumeTime;
+                } else {
+                    LOGGER.error("server return result is null");
+                    errorTPS[range] = errorTPS[range] + 1;
+                    errorResponseTimes[range] = errorResponseTimes[range] + consumeTime;
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+                LOGGER.error("client.invokeSync error", e);
+                long currentTime = System.nanoTime() / 1000L;
+                if (beginTime <= startTime) {
+                    continue;
+                }
+                long consumeTime = currentTime - beginTime;
+                sumResponseTimeSpread(consumeTime);
+                int range = Integer.parseInt(String.valueOf(beginTime - startTime)) / 1000000;
+                if (range >= maxRange) {
+                    System.err.println("benchmark range exceeds maxRange,range is: " + range + ",maxRange is: "
+                                       + maxRange);
+                    continue;
+                }
+                errorTPS[range] = errorTPS[range] + 1;
+                errorResponseTimes[range] = errorResponseTimes[range] + consumeTime;
+            }
+        }
+    }
+
+    public abstract Object invoke(ServiceFactory<?> serviceFactory);
+
+    public List<long[]> getResults() {
+        List<long[]> results = new ArrayList<long[]>();
+        results.add(responseSpreads);
+        results.add(tps);
+        results.add(responseTimes);
+        results.add(errorTPS);
+        results.add(errorResponseTimes);
+        return results;
+    }
+
+    private void sumResponseTimeSpread(long responseTime) {
+        responseTime = responseTime / 1000L;
+        if (responseTime <= 0) {
+            responseSpreads[0] = responseSpreads[0] + 1;
+        } else if (responseTime > 0 && responseTime <= 1) {
+            responseSpreads[1] = responseSpreads[1] + 1;
+        } else if (responseTime > 1 && responseTime <= 5) {
+            responseSpreads[2] = responseSpreads[2] + 1;
+        } else if (responseTime > 5 && responseTime <= 10) {
+            responseSpreads[3] = responseSpreads[3] + 1;
+        } else if (responseTime > 10 && responseTime <= 50) {
+            responseSpreads[4] = responseSpreads[4] + 1;
+        } else if (responseTime > 50 && responseTime <= 100) {
+            responseSpreads[5] = responseSpreads[5] + 1;
+        } else if (responseTime > 100 && responseTime <= 500) {
+            responseSpreads[6] = responseSpreads[6] + 1;
+        } else if (responseTime > 500 && responseTime <= 1000) {
+            responseSpreads[7] = responseSpreads[7] + 1;
+        } else if (responseTime > 1000) {
+            responseSpreads[8] = responseSpreads[8] + 1;
+        }
+    }
+
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidClientRunnable.java b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidClientRunnable.java
new file mode 100644
index 0000000000..d136543f0c
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/BidClientRunnable.java
@@ -0,0 +1,64 @@
+/**
+ * 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.rpc.benchmark;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+
+/**
+ * @author lishen
+ */
+public class BidClientRunnable extends AbstractClientRunnable{
+
+    private final BidRequest request = new BidRequest();
+
+    public BidClientRunnable(String protocol, String serialization, String targetIP, int targetPort, int clientNums, int rpcTimeout,
+                              CyclicBarrier barrier, CountDownLatch latch, long startTime,
+                              long endTime){
+        super(protocol, serialization, targetIP, targetPort, clientNums, rpcTimeout, barrier, latch, startTime, endTime);
+        Impression imp = new Impression();
+        imp.setBidFloor(1.1);
+        imp.setId("abc");
+        List<Impression> imps = new ArrayList<Impression>(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);
+    }
+
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @Override
+    public Object invoke(ServiceFactory serviceFactory) {
+        EchoService echoService = (EchoService) serviceFactory.get(EchoService.class);
+        BidRequest result = echoService.bid(request);
+        return result;
+    }
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ClientRunnable.java b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ClientRunnable.java
new file mode 100644
index 0000000000..6710ecb027
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ClientRunnable.java
@@ -0,0 +1,20 @@
+/**
+ * nfs-rpc
+ *   Apache License
+ *   
+ *   http://code.google.com/p/nfs-rpc (c) 2011
+ */
+package com.alibaba.dubbo.rpc.benchmark;
+
+import java.util.List;
+
+/**
+ * client runnable,so we can collect results
+ * 
+ * @author <a href="mailto:bluedavy@gmail.com">bluedavy</a>
+ */
+public interface ClientRunnable extends Runnable {
+	
+	public List<long[]> getResults();
+
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/RpcBenchmarkClient.java b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/RpcBenchmarkClient.java
new file mode 100644
index 0000000000..5972e75775
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/RpcBenchmarkClient.java
@@ -0,0 +1,24 @@
+package com.alibaba.dubbo.rpc.benchmark;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+
+public class RpcBenchmarkClient extends AbstractBenchmarkClient {
+
+    @SuppressWarnings("rawtypes")
+    @Override
+    public ClientRunnable getClientRunnable(String protocol, String serialization, String targetIP, int targetPort, int clientNums, int rpcTimeout,
+                                            CyclicBarrier barrier, CountDownLatch latch, long startTime, long endTime) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
+        String runnable = properties.getProperty("classname");
+        Class[] parameterTypes = new Class[] { String.class, String.class, String.class, int.class, int.class, int.class, CyclicBarrier.class,
+                CountDownLatch.class, long.class, long.class };
+        Object[] parameters = new Object[] { protocol, serialization, targetIP, targetPort, clientNums, rpcTimeout, barrier, latch, startTime,
+                endTime };
+           return (ClientRunnable) Class.forName(runnable).getConstructor(parameterTypes).newInstance(parameters);
+    }
+
+    public static void main(String[] args) throws Exception {
+        new RpcBenchmarkClient().run(args);
+    }
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ServiceFactory.java b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ServiceFactory.java
new file mode 100644
index 0000000000..29a497ea32
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/ServiceFactory.java
@@ -0,0 +1,118 @@
+package com.alibaba.dubbo.rpc.benchmark;
+
+import java.util.concurrent.ConcurrentHashMap;
+
+import com.alibaba.dubbo.common.utils.StringUtils;
+import com.alibaba.dubbo.config.ApplicationConfig;
+import com.alibaba.dubbo.config.ReferenceConfig;
+
+/**
+ * Abstract Service Factory,create custom nums Service
+ * 
+ * @author tony.chenl
+ */
+public class ServiceFactory<T> {
+
+    String targetIP       = null;
+
+    int    targetPort     = 0;
+
+    int    connectTimeout = 0;
+
+    int    clientNums     = 0;
+
+    String protocol;
+
+    String serialization;
+
+    public String getTargetIP() {
+        return targetIP;
+    }
+
+    public void setTargetIP(String targetIP) {
+        this.targetIP = targetIP;
+    }
+
+    public int getTargetPort() {
+        return targetPort;
+    }
+
+    public void setTargetPort(int targetPort) {
+        this.targetPort = targetPort;
+    }
+
+    public int getConnectTimeout() {
+        return connectTimeout;
+    }
+
+    public void setConnectTimeout(int connectTimeout) {
+        this.connectTimeout = connectTimeout;
+    }
+
+    public int getClientNums() {
+        return clientNums;
+    }
+
+    public void setClientNums(int clientNums) {
+        this.clientNums = clientNums;
+    }
+
+    public String getProtocol() {
+        return protocol;
+    }
+
+    public void setProtocol(String protocol) {
+        this.protocol = protocol;
+    }
+
+    public String getSerialization() {
+        return serialization;
+    }
+
+    public void setSerialization(String serialization) {
+        this.serialization = serialization;
+    }
+
+    // Cache ExchangeClient
+    private static ConcurrentHashMap<String, Object> services = new ConcurrentHashMap<String, Object>();
+
+    @SuppressWarnings("unchecked")
+    public T get(final Class<T> cls){
+        String key = cls.getName();
+        if (services.containsKey(key)) {
+            return (T) services.get(key);
+
+        } else {
+            T service = createClient(cls, targetIP, targetPort, connectTimeout,clientNums, protocol, serialization);
+            services.put(key, service);
+            return (T) services.get(key);
+        }
+    }
+
+    protected T createClient(Class<T> cls, String targetIP, int targetPort, int connectTimeout,int clientNums, String protocol, String serialization){
+        ReferenceConfig<T> referenceConfig = new ReferenceConfig<T>();
+        referenceConfig.setInterface(cls);
+        StringBuilder url = new StringBuilder();
+        url.append(protocol);
+        url.append("://");
+        url.append(targetIP);
+        url.append(":");
+        url.append(targetPort);
+        url.append("/");
+        url.append(cls.getName());
+        url.append("?optimizer=com.alibaba.dubbo.rpc.benchmark.SerializationOptimizerImpl");
+        if (!StringUtils.isEmpty(serialization)) {
+            url.append("&serialization=");
+            url.append(serialization);
+        }
+        referenceConfig.setUrl(url.toString());
+        // hardcode
+        referenceConfig.setConnections(clientNums);
+        ApplicationConfig application = new ApplicationConfig();
+        application.setName("dubbo_consumer");
+        referenceConfig.setApplication(application);
+        referenceConfig.setTimeout(connectTimeout);
+        return referenceConfig.get();
+    }
+
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/TextClientRunnable.java b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/TextClientRunnable.java
new file mode 100644
index 0000000000..923e885825
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/java/com/alibaba/dubbo/rpc/benchmark/TextClientRunnable.java
@@ -0,0 +1,46 @@
+/**
+ * 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.rpc.benchmark;
+
+import org.apache.commons.lang.StringUtils;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+
+/**
+ * @author lishen
+ */
+public class TextClientRunnable extends AbstractClientRunnable{
+
+    private final Text text =  new Text(StringUtils.leftPad("", 50000));
+
+    public TextClientRunnable(String protocol, String serialization, String targetIP, int targetPort, int clientNums, int rpcTimeout,
+                              CyclicBarrier barrier, CountDownLatch latch, long startTime,
+                              long endTime){
+        super(protocol, serialization, targetIP, targetPort, clientNums, rpcTimeout, barrier, latch, startTime, endTime);
+    }
+
+    @SuppressWarnings({ "unchecked", "rawtypes" })
+    @Override
+    public Object invoke(ServiceFactory serviceFactory) {
+        EchoService echoService = (EchoService) serviceFactory.get(EchoService.class);
+        return echoService.text(text);
+    }
+//
+//    public static void main(String[] args) {
+//        System.out.println( StringUtils.leftPad("", 1000).getBytes().length);
+//    }
+}
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/dubbo-test/dubbo-test-benchmark-client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
new file mode 100644
index 0000000000..be0c538174
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
@@ -0,0 +1 @@
+org.apache.cxf.common.logging.Log4jLogger
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/resources/dubbo.properties b/dubbo-test/dubbo-test-benchmark-client/src/main/resources/dubbo.properties
new file mode 100644
index 0000000000..f28a602c69
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/resources/dubbo.properties
@@ -0,0 +1,30 @@
+serverip=127.0.0.1
+concurrents=10
+timeout=3000
+runtime=300
+connectionnums=10
+
+classname=com.alibaba.dubbo.rpc.benchmark.BidClientRunnable
+#classname=com.alibaba.dubbo.rpc.benchmark.TextClientRunnable
+
+protocol=rest
+serverport=8888
+
+#protocol=dubbo
+#serverport=20880
+#serialization=kryo
+
+#protocol=webservice
+#serverport=8892
+
+#protocol=http
+#serverport=8889
+
+#protocol=hessian
+#serverport=8890
+
+#protocol=rmi
+#serverport=8893
+
+
+
diff --git a/dubbo-test/dubbo-test-benchmark-client/src/main/resources/log4j.xml b/dubbo-test/dubbo-test-benchmark-client/src/main/resources/log4j.xml
new file mode 100644
index 0000000000..cd275123fd
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-client/src/main/resources/log4j.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n" />
+		</layout>
+	</appender>
+	<root>
+		<level value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/pom.xml b/dubbo-test/dubbo-test-benchmark-server/pom.xml
new file mode 100644
index 0000000000..9a97c7df23
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/pom.xml
@@ -0,0 +1,195 @@
+<!--
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.alibaba</groupId>
+		<artifactId>dubbo-test</artifactId>
+		<version>2.8.4</version>
+	</parent>
+	<artifactId>dubbo-test-benchmark-server</artifactId>
+	<packaging>jar</packaging>
+	<name>${project.artifactId}</name>
+	<description>The benchmark test module of dubbo project</description>
+	<properties>
+		<skip_maven_deploy>true</skip_maven_deploy>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>dubbo</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-test-benchmark-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.0</version>
+            <!--<scope>provided</scope>-->
+        </dependency>
+	</dependencies>
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <excludes>
+                    <exclude>**/*.*</exclude>
+                </excludes>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.alibaba</groupId>
+                                    <artifactId>dubbo</artifactId>
+                                    <version>${project.parent.version}</version>
+                                    <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
+                                    <includes>META-INF/assembly/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptor>src/assembly/assembly.xml</descriptor>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/assembly/assembly.xml b/dubbo-test/dubbo-test-benchmark-server/src/assembly/assembly.xml
new file mode 100644
index 0000000000..674a2dc869
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/assembly/assembly.xml
@@ -0,0 +1,23 @@
+<assembly>
+    <id>assembly</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>src/cli</directory>
+            <outputDirectory>/</outputDirectory>
+            <fileMode>0755</fileMode>
+    </fileSet>
+    <fileSet>
+        <directory>src/main/resources</directory>
+        <outputDirectory>conf</outputDirectory>
+    </fileSet>
+   </fileSets>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>lib</outputDirectory>
+        </dependencySet>
+    </dependencySets>
+</assembly>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/cli/run.bat b/dubbo-test/dubbo-test-benchmark-server/src/cli/run.bat
new file mode 100644
index 0000000000..0d4c7b031f
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/cli/run.bat
@@ -0,0 +1 @@
+java -Xms1g -Xmx1g -XX:PermSize=64M -XX:+UseConcMarkSweepGC -Djava.ext.dirs=lib -classpath conf com.alibaba.dubbo.container.Main > benchmark.log
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/cli/run.sh b/dubbo-test/dubbo-test-benchmark-server/src/cli/run.sh
new file mode 100644
index 0000000000..30d00abd10
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/cli/run.sh
@@ -0,0 +1 @@
+java -Xms1g -Xmx1g -XX:PermSize=64M -XX:+UseConcMarkSweepGC -Djava.ext.dirs=./lib -classpath conf com.alibaba.dubbo.container.Main  > "benchmark.log" 2>&1
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoServiceImpl.java b/dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoServiceImpl.java
new file mode 100644
index 0000000000..5ae5810d69
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/EchoServiceImpl.java
@@ -0,0 +1,41 @@
+/**
+ * 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.rpc.benchmark;
+
+public class EchoServiceImpl implements EchoService {
+
+//    private final BidResponse response = new BidResponse();
+
+    public EchoServiceImpl() {
+//        response.setId("abc");
+//
+//        SeatBid seatBid = new SeatBid();
+//        seatBid.setGroup("group");
+//        seatBid.setSeat("seat");
+//        List<SeatBid> seatBids = new ArrayList<SeatBid>(1);
+//        seatBids.add(seatBid);
+//
+//        response.setSeatBids(seatBids);
+    }
+
+    public BidRequest bid(BidRequest request) {
+        return request;
+    }
+
+    public Text text(Text text) {
+        return text;
+    }
+}
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/Main.java b/dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/Main.java
new file mode 100644
index 0000000000..786d1b067b
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/main/java/com/alibaba/dubbo/rpc/benchmark/Main.java
@@ -0,0 +1,24 @@
+/**
+ * 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.rpc.benchmark;
+
+public class Main {
+
+	public static void main(String[] args) {
+        com.alibaba.dubbo.container.Main.main(args);
+    }
+
+}
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
new file mode 100644
index 0000000000..be0c538174
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/cxf/org.apache.cxf.Logger
@@ -0,0 +1 @@
+org.apache.cxf.common.logging.Log4jLogger
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/spring/dubbo-provider.xml b/dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/spring/dubbo-provider.xml
new file mode 100644
index 0000000000..ada9b4d5cd
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/main/resources/META-INF/spring/dubbo-provider.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="demo-provider" owner="shenli" organization="dangdang"/>
+
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+
+    <!--<dubbo:monitor protocol="registry"/>-->
+
+	<bean id="echoService" class="com.alibaba.dubbo.rpc.benchmark.EchoServiceImpl" />
+
+    <dubbo:protocol name="dubbo" serialization="kryo" optimizer="com.alibaba.dubbo.rpc.benchmark.SerializationOptimizerImpl" threads="20"/>
+    <!--<dubbo:protocol name="dubbo" serialization="fst" optimizer="com.alibaba.dubbo.rpc.dubbo.rpc.benchmark.SerializationOptimizerImpl"/>-->
+
+    <!--<dubbo:protocol name="dubbo" serialization="nativejava"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="hessian2"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="fastjson"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="dubbo"/>-->
+
+    <dubbo:protocol name="http" port="8889"  threads="20"/>
+    <dubbo:protocol name="hessian" port="8890"  threads="20"/>
+    <dubbo:protocol name="webservice" port="8892"  threads="20"/>
+    <dubbo:protocol name="rmi" port="8893"  threads="20"/>
+
+
+    <!--TODO according to the spring convention, we should use something like keep-alive-->
+    <!-- use netty server -->
+    <!--<dubbo:protocol name="rest" port="8888" keepalive="true" server="netty" threads="20"/>-->
+
+    <!-- use the default jetty server -->
+    <dubbo:protocol name="rest" port="8888" threads="20"/>
+
+    <!-- use the external tomcat or other server with the servlet approach; the port and contextpath must be exactly the same as those in external server -->
+    <!--<dubbo:protocol name="rest" port="8888" contextpath="services" server="servlet"/>-->
+
+	<dubbo:service interface="com.alibaba.dubbo.rpc.benchmark.EchoService" ref="echoService"  protocol="dubbo, rest, hessian, http, webservice, rmi"/>
+</beans>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/main/resources/log4j.xml b/dubbo-test/dubbo-test-benchmark-server/src/main/resources/log4j.xml
new file mode 100644
index 0000000000..cd275123fd
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/main/resources/log4j.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n" />
+		</layout>
+	</appender>
+	<root>
+		<level value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark-server/src/main/webapp/WEB-INF/web.xml b/dubbo-test/dubbo-test-benchmark-server/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..2a2f3a6cea
--- /dev/null
+++ b/dubbo-test/dubbo-test-benchmark-server/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>/WEB-INF/classes/META-INF/spring/dubbo-provider.xml</param-value>
+    </context-param>
+
+    <!--this listener must be defined before the spring listener-->
+    <listener>
+        <listener-class>com.alibaba.dubbo.remoting.http.servlet.BootstrapListener</listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/*</url-pattern>
+    </servlet-mapping>
+</web-app>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-benchmark/pom.xml b/dubbo-test/dubbo-test-benchmark/pom.xml
index ae1ea13548..2593c9e505 100644
--- a/dubbo-test/dubbo-test-benchmark/pom.xml
+++ b/dubbo-test/dubbo-test-benchmark/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-test</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-test-benchmark</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-test/dubbo-test-compatibility/pom.xml b/dubbo-test/dubbo-test-compatibility/pom.xml
index 7f7bfe113c..d02370e64c 100644
--- a/dubbo-test/dubbo-test-compatibility/pom.xml
+++ b/dubbo-test/dubbo-test-compatibility/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-test</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-test-compatibility</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-test/dubbo-test-examples/pom.xml b/dubbo-test/dubbo-test-examples/pom.xml
index aa9639ec76..43b4b69929 100644
--- a/dubbo-test/dubbo-test-examples/pom.xml
+++ b/dubbo-test/dubbo-test-examples/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-test</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-test-examples</artifactId>
 	<packaging>jar</packaging>
@@ -137,6 +137,30 @@
 			<groupId>org.hibernate</groupId>
 			<artifactId>hibernate-validator</artifactId>
 		</dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.datatype</groupId>
+            <artifactId>jackson-datatype-joda</artifactId>
+            <version>2.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aop</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+            <version>1.7.4</version>
+        </dependency>
 	</dependencies>
 
     <build>
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationConsumer.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationConsumer.java
new file mode 100644
index 0000000000..be5a4d04f3
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationConsumer.java
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+package com.alibaba.dubbo.examples.aop;
+
+import com.alibaba.dubbo.examples.aop.action.AopAnnotationAction;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @author dylan
+ */
+public class AopAnnotationConsumer {
+
+    public static void main(String[] args) throws Exception {
+        String config = AopAnnotationConsumer.class.getPackage().getName().replace('.', '/') + "/annotation-consumer.xml";
+        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(config);
+        context.start();
+        final AopAnnotationAction annotationAction = (AopAnnotationAction)context.getBean("aopAnnotationAction");
+        String hello = annotationAction.doSayHello("world");
+        System.out.println("result :" + hello);
+        System.in.read();
+    }
+
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationProvider.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationProvider.java
new file mode 100644
index 0000000000..9a9542a34a
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/AopAnnotationProvider.java
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+package com.alibaba.dubbo.examples.aop;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @author dylan
+ */
+public class AopAnnotationProvider {
+    
+    public static void main(String[] args) throws Exception {
+        String config = AopAnnotationProvider.class.getPackage().getName().replace('.', '/') + "/annotation-provider.xml";
+        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(config);
+        context.start();
+        System.in.read();
+    }
+    
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/action/AopAnnotationAction.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/action/AopAnnotationAction.java
new file mode 100644
index 0000000000..52a4ed20b0
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/action/AopAnnotationAction.java
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+package com.alibaba.dubbo.examples.aop.action;
+
+import com.alibaba.dubbo.config.annotation.Reference;
+import com.alibaba.dubbo.examples.aop.api.AopAnnotationService;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author dylan
+ */
+@Component("aopAnnotationAction")
+public class AopAnnotationAction {
+    
+    @Reference
+    private AopAnnotationService annotationService;
+    
+    public String doSayHello(String name) {
+        return annotationService.sayHello(name);
+    }
+
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-consumer.xml b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-consumer.xml
new file mode 100644
index 0000000000..6eb4da3936
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-consumer.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="aop-annotation-consumer"  />
+    
+    <dubbo:registry address="zookeeper://127.0.0.1:2181" />
+    
+	<dubbo:annotation package="com.alibaba.dubbo.examples.aop.action" />
+
+</beans>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-provider.xml b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-provider.xml
new file mode 100644
index 0000000000..9dfaf32445
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/annotation-provider.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <import resource="aop-aspect.xml"/>
+
+    <dubbo:application name="aop-annotation-provider"  />
+    
+    <dubbo:registry address="zookeeper://127.0.0.1:2181" />
+    
+    <dubbo:protocol name="dubbo" port="20880" />
+    
+	<dubbo:annotation package="com.alibaba.dubbo.examples.aop.impl" />
+	
+</beans>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aop-aspect.xml b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aop-aspect.xml
new file mode 100644
index 0000000000..8061f37f73
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aop-aspect.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" xmlns:aop="http://www.springframework.org/schema/aop"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">
+
+    <aop:config proxy-target-class="true">
+        <aop:aspect ref="annotationAspect">
+            <aop:before method="before" pointcut="execution(* com.alibaba.dubbo.examples.aop.impl.AopAnnotationServiceImpl.*(..))"/>
+                </aop:aspect>
+    </aop:config>
+    <bean id="annotationAspect" class="com.alibaba.dubbo.examples.aop.aspect.AnnotationAspect"/>
+
+</beans>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/api/AopAnnotationService.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/api/AopAnnotationService.java
new file mode 100644
index 0000000000..60e6cefc30
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/api/AopAnnotationService.java
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+package com.alibaba.dubbo.examples.aop.api;
+
+/**
+ * @author dylan
+ */
+public interface AopAnnotationService {
+    
+    String sayHello(String name);
+
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aspect/AnnotationAspect.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aspect/AnnotationAspect.java
new file mode 100644
index 0000000000..5fb0743599
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/aspect/AnnotationAspect.java
@@ -0,0 +1,11 @@
+package com.alibaba.dubbo.examples.aop.aspect;
+
+/**
+ * @author dylan
+ */
+public class AnnotationAspect {
+
+    public void before(){
+        System.out.println("aspect before------------");
+    }
+}
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/provider/DemoServiceImpl.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/impl/AopAnnotationServiceImpl.java
similarity index 50%
rename from dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/provider/DemoServiceImpl.java
rename to dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/impl/AopAnnotationServiceImpl.java
index 346ab601fb..71440f6ee3 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/java/com/alibaba/dubbo/demo/provider/DemoServiceImpl.java
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/aop/impl/AopAnnotationServiceImpl.java
@@ -1,31 +1,32 @@
-/*
- * 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 java.text.SimpleDateFormat;
-import java.util.Date;
-
-import com.alibaba.dubbo.demo.DemoService;
-import com.alibaba.dubbo.rpc.RpcContext;
-
-public class DemoServiceImpl implements DemoService {
-
-    public String sayHello(String name) {
-        System.out.println("[" + new SimpleDateFormat("HH:mm:ss").format(new Date()) + "] Hello " + name + ", request from consumer: " + RpcContext.getContext().getRemoteAddress());
-        return "Hello " + name + ", response form provider: " + RpcContext.getContext().getLocalAddress();
-    }
-    
+/*
+ * 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.
+ */
+package com.alibaba.dubbo.examples.aop.impl;
+
+import com.alibaba.dubbo.config.annotation.Service;
+import com.alibaba.dubbo.examples.aop.api.AopAnnotationService;
+
+/**
+ * @author dylan
+ */
+@Service
+public class AopAnnotationServiceImpl implements AopAnnotationService {
+
+    public String sayHello(String name) {
+        System.out.println("aop provider received: " + name);
+        return "aop annotation: hello, " + name;
+    }
+
 }
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonConsumer.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonConsumer.java
new file mode 100644
index 0000000000..e13847d690
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonConsumer.java
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+package com.alibaba.dubbo.examples.jackson;
+
+import com.alibaba.dubbo.examples.jackson.api.*;
+import com.google.common.collect.Lists;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * JacksonConsumer
+ *
+ * @author dylan
+ */
+public class JacksonConsumer {
+
+    public static void main(String[] args) throws Exception {
+        String config = JacksonConsumer.class.getPackage().getName().replace('.', '/') + "/jackson-consumer.xml";
+        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(config);
+        context.start();
+        JacksonService jacksonService = (JacksonService) context.getBean("jacksonService");
+        System.out.println("TEST: sayHello");
+        String hello = jacksonService.sayHello("world");
+        System.out.println(hello);
+
+        System.out.println("TEST: testJacksonBean");
+        JacksonBean jacksonBean = jacksonService.testJacksonBean(new JacksonBean(), new JacksonInnerBean());
+        System.out.println(jacksonBean);
+
+        System.out.println("TEST: testInheritBean");
+        Inherit inherit = jacksonService.testInheritBean(new InheritBean(), new JacksonBean());
+        System.out.println(inherit);
+
+        System.out.println("TEST: testArray");
+        int[] intArray = jacksonService.testArray(new int[]{1,2});
+        System.out.println(Arrays.toString(intArray));
+
+        System.out.println("TEST: testBeanArray");
+        JacksonBean[] beanArray = jacksonService.testBeanArray(new JacksonBean[]{new JacksonBean(), new JacksonBean()});
+        System.out.println(Arrays.toString(beanArray));
+
+        System.out.println("TEST: testException");
+        try {
+            jacksonService.testException();
+        } catch(Exception e){
+            System.out.println("exception : " + e.getClass() + " : " + e.getMessage());
+        }
+
+        System.in.read();
+    }
+
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonProvider.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonProvider.java
new file mode 100644
index 0000000000..dfa097fce1
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/JacksonProvider.java
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+package com.alibaba.dubbo.examples.jackson;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * JacksonProvider
+ * 
+ * @author dylan
+ */
+public class JacksonProvider {
+    
+    public static void main(String[] args) throws Exception {
+        String config = JacksonProvider.class.getPackage().getName().replace('.', '/') + "/jackson-provider.xml";
+        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(config);
+        context.start();
+        System.in.read();
+    }
+    
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/AbstractInheritBean.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/AbstractInheritBean.java
new file mode 100644
index 0000000000..70ee7e17eb
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/AbstractInheritBean.java
@@ -0,0 +1,33 @@
+package com.alibaba.dubbo.examples.jackson.api;
+
+/**
+ * Created by dylan on 14-11-22.
+ */
+public abstract class AbstractInheritBean implements Inherit{
+    private String username = "Dylan";
+    private int age = 10;
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public int getAge() {
+        return age;
+    }
+
+    public void setAge(int age) {
+        this.age = age;
+    }
+
+    @Override
+    public String toString() {
+        return "AbstractInheritBean{" +
+                "username='" + username + '\'' +
+                ", age=" + age +
+                '}';
+    }
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/Inherit.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/Inherit.java
new file mode 100644
index 0000000000..e57b13bba9
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/Inherit.java
@@ -0,0 +1,7 @@
+package com.alibaba.dubbo.examples.jackson.api;
+
+/**
+ * Created by dylan on 14-11-22.
+ */
+public interface Inherit {
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean.java
new file mode 100644
index 0000000000..6bccb8e909
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean.java
@@ -0,0 +1,35 @@
+package com.alibaba.dubbo.examples.jackson.api;
+
+import java.util.Date;
+
+/**
+ * Created by dylan on 14-11-22.
+ */
+public class InheritBean extends AbstractInheritBean {
+    private String address = "ShangHai";
+    private Date birthDate = new Date();
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public Date getBirthDate() {
+        return birthDate;
+    }
+
+    public void setBirthDate(Date birthDate) {
+        this.birthDate = birthDate;
+    }
+
+    @Override
+    public String toString() {
+        return "InheritBean{" +
+                "address='" + address + '\'' +
+                ", birthDate=" + birthDate +
+                "} " + super.toString();
+    }
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean2.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean2.java
new file mode 100644
index 0000000000..4bd51b074c
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/InheritBean2.java
@@ -0,0 +1,25 @@
+package com.alibaba.dubbo.examples.jackson.api;
+
+import org.joda.time.DateTime;
+
+/**
+ * Created by dylan on 14-11-22.
+ */
+public class InheritBean2 extends AbstractInheritBean {
+    private String zipCode = "200000";
+
+    public String getZipCode() {
+        return zipCode;
+    }
+
+    public void setZipCode(String zipCode) {
+        this.zipCode = zipCode;
+    }
+
+    @Override
+    public String toString() {
+        return "InheritBean2{" +
+                "zipCode='" + zipCode + '\'' +
+                "} " + super.toString();
+    }
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonBean.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonBean.java
new file mode 100644
index 0000000000..f42ec81210
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonBean.java
@@ -0,0 +1,110 @@
+package com.alibaba.dubbo.examples.jackson.api;
+
+import org.joda.time.DateTime;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by dylan on 11/15/14.
+ */
+public class JacksonBean {
+
+    private boolean bValue = true;
+    private String sValue = "string";
+    private int iValue = 20;
+    private double dValue = 20.5;
+    private float fValue = 2.18f;
+    private long lValue = 3;
+    private Double dValue2 = null;
+    private Date date = Calendar.getInstance().getTime();
+    private DateTime dateTime = DateTime.now();
+    private List<JacksonInnerBean> innerBeanList = new ArrayList<JacksonInnerBean>();
+
+    public JacksonBean(){
+        innerBeanList.add(new JacksonInnerBean());
+        innerBeanList.add(new JacksonInnerBean());
+    }
+
+    @Override
+    public String toString() {
+        return "JacksonBean{" +
+                "bValue=" + bValue +
+                ", sValue='" + sValue + '\'' +
+                ", iValue=" + iValue +
+                ", dValue=" + dValue +
+                ", fValue=" + fValue +
+                ", lValue=" + lValue +
+                ", dValue2=" + dValue2 +
+                ", date=" + date +
+                ", dateTime=" + dateTime +
+                ", innerBeanList=" + innerBeanList +
+                '}';
+    }
+
+    public boolean isbValue() {
+        return bValue;
+    }
+
+    public void setbValue(boolean bValue) {
+        this.bValue = bValue;
+    }
+
+    public String getsValue() {
+        return sValue;
+    }
+
+    public void setsValue(String sValue) {
+        this.sValue = sValue;
+    }
+
+    public int getiValue() {
+        return iValue;
+    }
+
+    public void setiValue(int iValue) {
+        this.iValue = iValue;
+    }
+
+    public double getdValue() {
+        return dValue;
+    }
+
+    public void setdValue(double dValue) {
+        this.dValue = dValue;
+    }
+
+    public float getfValue() {
+        return fValue;
+    }
+
+    public void setfValue(float fValue) {
+        this.fValue = fValue;
+    }
+
+    public long getlValue() {
+        return lValue;
+    }
+
+    public void setlValue(long lValue) {
+        this.lValue = lValue;
+    }
+
+    public Double getdValue2() {
+        return dValue2;
+    }
+
+    public void setdValue2(Double dValue2) {
+        this.dValue2 = dValue2;
+    }
+
+    public List<JacksonInnerBean> getInnerBeanList() {
+        return innerBeanList;
+    }
+
+    public void setInnerBeanList(List<JacksonInnerBean> innerBeanList) {
+        this.innerBeanList = innerBeanList;
+    }
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonInnerBean.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonInnerBean.java
new file mode 100644
index 0000000000..1a44907c8d
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonInnerBean.java
@@ -0,0 +1,33 @@
+package com.alibaba.dubbo.examples.jackson.api;
+
+/**
+ * Created by dylan on 11/15/14.
+ */
+public class JacksonInnerBean {
+    private String siValue = "innerStr";
+    private int iiValue = 18;
+
+    public String getSiValue() {
+        return siValue;
+    }
+
+    public void setSiValue(String siValue) {
+        this.siValue = siValue;
+    }
+
+    public int getIiValue() {
+        return iiValue;
+    }
+
+    public void setIiValue(int iiValue) {
+        this.iiValue = iiValue;
+    }
+
+    @Override
+    public String toString() {
+        return "InnerBean{" +
+                "siValue='" + siValue + '\'' +
+                ", iiValue=" + iiValue +
+                '}';
+    }
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonService.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonService.java
new file mode 100644
index 0000000000..836eb8e3b7
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/api/JacksonService.java
@@ -0,0 +1,34 @@
+/**
+ * Project: dubbo-examples
+ * 
+ * File Created at 2012-2-17
+ * $Id$
+ * 
+ * Copyright 1999-2100 Alibaba.com Corporation 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.examples.jackson.api;
+
+/**
+ * @author william.liangf
+ */
+public interface JacksonService {
+    
+    String sayHello(String name);
+
+    public JacksonBean testJacksonBean(JacksonBean jacksonBean, JacksonInnerBean jacksonInnerBean);
+
+    public Inherit testInheritBean(Inherit inherit, JacksonBean jacksonBean);
+
+    public int[] testArray(int[] array);
+
+    public JacksonBean[] testBeanArray(JacksonBean[] jacksonBeans);
+
+    public void testException();
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/impl/JacksonServiceImpl.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/impl/JacksonServiceImpl.java
new file mode 100644
index 0000000000..f13528bc8b
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/impl/JacksonServiceImpl.java
@@ -0,0 +1,64 @@
+/**
+ * Project: dubbo-examples
+ *
+ * File Created at 2012-2-17
+ * $Id$
+ *
+ * Copyright 1999-2100 Alibaba.com Corporation 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.examples.jackson.impl;
+
+import com.alibaba.dubbo.examples.jackson.api.*;
+
+/**
+ * @author william.liangf
+ */
+public class JacksonServiceImpl implements JacksonService {
+
+    public String sayHello(String name) {
+        return "hello, " + name;
+    }
+
+    @Override
+    public JacksonBean testJacksonBean(JacksonBean jacksonBean, JacksonInnerBean jacksonInnerBean) {
+        System.out.println(jacksonBean);
+        System.out.println(jacksonInnerBean);
+        jacksonBean.getInnerBeanList().add(jacksonInnerBean);
+        return jacksonBean;
+    }
+
+    @Override
+    public Inherit testInheritBean(Inherit inherit, JacksonBean jacksonBean) {
+        System.out.println(inherit);
+        System.out.println(jacksonBean);
+        return new InheritBean2();
+    }
+
+    @Override
+    public int[] testArray(int[] array) {
+        return new int[]{3, 4};
+    }
+
+    @Override
+    public JacksonBean[] testBeanArray(JacksonBean[] jacksonBeans) {
+        System.out.println("testBeanArray");
+        for (JacksonBean in : jacksonBeans) {
+            System.out.println(in);
+        }
+        return new JacksonBean[]{
+                new JacksonBean(), new JacksonBean()
+        };
+    }
+
+    @Override
+    public void testException() {
+        throw new RuntimeException("exception from provider");
+    }
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-consumer.xml b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-consumer.xml
new file mode 100644
index 0000000000..f4a05eb5ac
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-consumer.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="jackson-consumer"  />
+    
+    <dubbo:registry address="zookeeper://127.0.0.1:2181" />
+    
+	<dubbo:reference id="jacksonService" interface="com.alibaba.dubbo.examples.jackson.api.JacksonService" version="*" />
+
+</beans>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-provider.xml b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-provider.xml
new file mode 100644
index 0000000000..93a9d2a621
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jackson-provider.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="jackson-provider"  />
+    
+    <dubbo:registry address="zookeeper://127.0.0.1:2181" />
+    <dubbo:provider timeout="60000"/>
+    <dubbo:protocol name="dubbo" port="20880" serialization="jackson" />
+    
+    <bean id="jacksonService" class="com.alibaba.dubbo.examples.jackson.impl.JacksonServiceImpl" />
+    
+	<dubbo:service interface="com.alibaba.dubbo.examples.jackson.api.JacksonService" version="1.0.0" ref="jacksonService" />
+	
+</beans>
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jacksonprovider/CustomJacksonObjectMapperProvider.java b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jacksonprovider/CustomJacksonObjectMapperProvider.java
new file mode 100644
index 0000000000..b6f1c2de4d
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/java/com/alibaba/dubbo/examples/jackson/jacksonprovider/CustomJacksonObjectMapperProvider.java
@@ -0,0 +1,15 @@
+package com.alibaba.dubbo.examples.jackson.jacksonprovider;
+
+import com.alibaba.dubbo.common.json.JacksonObjectMapperProvider;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * Created by dylan on 11/15/14.
+ */
+public class CustomJacksonObjectMapperProvider implements JacksonObjectMapperProvider {
+    @Override
+    public ObjectMapper getObjectMapper() {
+        System.out.println("get object mapper from CustomJacksonObjectMapperProvider");
+        return new ObjectMapper();
+    }
+}
diff --git a/dubbo-test/dubbo-test-examples/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.common.json.JacksonObjectMapperProvider b/dubbo-test/dubbo-test-examples/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.common.json.JacksonObjectMapperProvider
new file mode 100644
index 0000000000..b14abca92d
--- /dev/null
+++ b/dubbo-test/dubbo-test-examples/src/main/resources/META-INF/dubbo/com.alibaba.dubbo.common.json.JacksonObjectMapperProvider
@@ -0,0 +1 @@
+default=com.alibaba.dubbo.examples.jackson.jacksonprovider.CustomJacksonObjectMapperProvider
\ No newline at end of file
diff --git a/dubbo-test/dubbo-test-integration/pom.xml b/dubbo-test/dubbo-test-integration/pom.xml
index 52258d76c2..cbf43a6836 100644
--- a/dubbo-test/dubbo-test-integration/pom.xml
+++ b/dubbo-test/dubbo-test-integration/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-test</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-test-integration</artifactId>
 	<packaging>jar</packaging>
diff --git a/dubbo-test/pom.xml b/dubbo-test/pom.xml
index 37189c188e..8ccfec26d3 100644
--- a/dubbo-test/pom.xml
+++ b/dubbo-test/pom.xml
@@ -19,7 +19,7 @@
 	<parent>
 		<groupId>com.alibaba</groupId>
 		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
+		<version>2.8.4</version>
 	</parent>
 	<artifactId>dubbo-test</artifactId>
 	<packaging>pom</packaging>
@@ -32,6 +32,9 @@
 		<module>dubbo-test-benchmark</module>
 		<module>dubbo-test-compatibility</module>
 		<module>dubbo-test-integration</module>
-                <module>dubbo-test-examples</module>
+        <module>dubbo-test-examples</module>
+        <module>dubbo-test-benchmark-api</module>
+        <module>dubbo-test-benchmark-server</module>
+        <module>dubbo-test-benchmark-client</module>
 	</modules>
 </project>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
new file mode 100644
index 0000000000..844d9844db
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/pom.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.alibaba</groupId>
+  <artifactId>dubbo-demo-lite-archetype</artifactId>
+  <version>2.8.4</version>
+  <packaging>maven-archetype</packaging>
+
+  <name>dubbo-demo-lite-archetype</name>
+
+  <build>
+    <extensions>
+      <extension>
+        <groupId>org.apache.maven.archetype</groupId>
+        <artifactId>archetype-packaging</artifactId>
+        <version>2.2</version>
+      </extension>
+    </extensions>
+
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-archetype-plugin</artifactId>
+          <version>2.2</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <description>The demo lite module of dubbo project</description>
+
+  <url>http://code.alibabatech.com/wiki/display/dubbo/dubbo-demo-lite</url>
+
+  <developers>
+    <developer>
+      <id>shawn.qianx</id>
+      <name>QianXiao(Shawn)</name>
+      <email>shawn.qianx (AT) alibaba-inc.com</email>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+    <developer>
+      <id>william.liangf</id>
+      <name>LiangFei(William)</name>
+      <email>william.liangf (AT) alibaba-inc.com</email>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+    <developer>
+      <id>ding.lid</id>
+      <name>LiDing(Jerry)</name>
+      <email>ding.lid (AT) alibaba-inc.com</email>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+    <developer>
+      <id>chao.liuc</id>
+      <name>LiuChao(Charles)</name>
+      <email>chao.liuc (AT) alibaba-inc.com</email>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+    <developer>
+      <id>haoming.liuhm</id>
+      <name>LiuHaoMin(Ludvik)</name>
+      <email>haoming.liuhm (AT) alibaba-inc.com</email>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+    <developer>
+      <id>tony.chenl</id>
+      <name>ChenLei(Tony)</name>
+      <email>tony.chenl (AT) alibaba-inc.com</email>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+    <developer>
+      <id>gang.lvg</id>
+      <name>LvGang(Kimi)</name>
+      <email>gang.lvg (AT) alibaba-inc.com</email>
+      <roles>
+        <role>Developer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+  </developers>
+
+  <licenses>
+    <license>
+      <name>Apache 2</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+      <comments>A business-friendly OSS license</comments>
+    </license>
+  </licenses>
+
+  <scm>
+    <connection>scm:svn:http://code.alibabatech.com/svn/dubbo/trunk/dubbo-demo-lite</connection>
+    <url>http://code.alibabatech.com/svn/dubbo/trunk/dubbo-demo-lite</url>
+  </scm>
+</project>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/readme.md b/dubbo-tool/dubbo-demo-lite-archetype/readme.md
new file mode 100644
index 0000000000..0d5494bc0b
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/readme.md
@@ -0,0 +1,86 @@
+目的:
+快速的使用 maven archetype 进行 dubbox rest 项目工程搭建。
+本处默认从 dubbo-demo-lite 构建一个 rest 版本的 dubbox 框架结构。
+
+命令参考:
+
+1. 从一个已有的项目中构建一个 maven archetype,
+$ mvn archetype:create-from-project -Darchetype.filteredExtentions=java,xml,jsp,properties,sql
+
+2. 然后再修改模板中的文件,并执行
+$ mvn clean install
+
+3. 开始从一个已有的 maven archetype 中复制项目
+$ mkdir tmp
+$ cd tmp
+$ mvn archetype:generate -DarchetypeCatalog=local
+
+更多资料请参考
+http://maven.apache.org/archetype/maven-archetype-plugin/examples/create-multi-module-project.html
+
+
+使用示例列举:
+
+<pre>
+kangfoo@kangfoo-dk:~/work/hawkeye/tmp$ mvn archetype:generate -DarchetypeCatalog=local
+[INFO] Scanning for projects...
+[INFO]
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Stub Project (No POM) 1
+[INFO] ------------------------------------------------------------------------
+[INFO]
+[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
+[INFO]
+[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
+[INFO]
+[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
+[INFO] Generating project in Interactive mode
+[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
+Choose archetype:
+1: local -> com.alibaba:dubbo-demo-lite-archetype (The demo lite module of dubbo project)
+Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1
+Define value for property 'groupId': : com.tima
+Define value for property 'artifactId': : test3
+Define value for property 'version':  1.0-SNAPSHOT: :
+Define value for property 'package':  com.tima: : com.tima.test3
+Confirm properties configuration:
+groupId: com.tima
+artifactId: test3
+version: 1.0-SNAPSHOT
+package: com.tima.test3
+ Y: : Y
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating project from Archetype: dubbo-demo-lite-archetype:2.8.3
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.tima
+[INFO] Parameter: artifactId, Value: test3
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: package, Value: com.tima.test3
+[INFO] Parameter: packageInPathFormat, Value: com/tima/test3
+[INFO] Parameter: package, Value: com.tima.test3
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: groupId, Value: com.tima
+[INFO] Parameter: artifactId, Value: test3
+[INFO] Parent element not overwritten in /home/kangfoo/work/hawkeye/tmp/test3/test3-api/pom.xml
+[INFO] Parent element not overwritten in /home/kangfoo/work/hawkeye/tmp/test3/test3-provider/pom.xml
+[INFO] Parent element not overwritten in /home/kangfoo/work/hawkeye/tmp/test3/test3-consumer/pom.xml
+[INFO] project created from Archetype in dir: /home/kangfoo/work/hawkeye/tmp/test3
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESS
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 27.023s
+[INFO] Finished at: Fri Dec 12 14:49:00 CST 2014
+[INFO] Final Memory: 12M/105M
+[INFO] ------------------------------------------------------------------------
+kangfoo@kangfoo-dk:~/work/hawkeye/tmp$ cd test3/
+kangfoo@kangfoo-dk:~/work/hawkeye/tmp/test3$ ll
+总用量 24
+drwxrwxr-x 5 kangfoo kangfoo 4096 12月 12 14:49 ./
+drwxrwxr-x 4 kangfoo kangfoo 4096 12月 12 14:49 ../
+-rw-rw-r-- 1 kangfoo kangfoo 1793 12月 12 14:49 pom.xml
+drwxrwxr-x 3 kangfoo kangfoo 4096 12月 12 14:49 test3-api/
+drwxrwxr-x 3 kangfoo kangfoo 4096 12月 12 14:49 test3-consumer/
+drwxrwxr-x 3 kangfoo kangfoo 4096 12月 12 14:49 test3-provider/
+<pre>
+
+
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
new file mode 100644
index 0000000000..b610f8b176
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="dubbo-demo-lite"
+    xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modules>
+    <module id="${rootArtifactId}-api" dir="__rootArtifactId__-api" name="${rootArtifactId}-api">
+      <fileSets>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+          <directory>src/main/java</directory>
+          <includes>
+            <include>**/*.java</include>
+          </includes>
+        </fileSet>
+      </fileSets>
+    </module>
+    <module id="${rootArtifactId}-provider" dir="__rootArtifactId__-provider" name="${rootArtifactId}-provider">
+      <fileSets>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+          <directory>src/main/java</directory>
+          <includes>
+            <include>**/*.java</include>
+          </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+          <directory>src/main/webapp</directory>
+          <includes>
+            <include>**/*.xml</include>
+          </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+          <directory>src/main/resources</directory>
+          <includes>
+            <include>**/*.xml</include>
+          </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+          <directory>src/test/java</directory>
+          <includes>
+            <include>**/*.java</include>
+          </includes>
+        </fileSet>
+      </fileSets>
+    </module>
+    <module id="${rootArtifactId}-consumer" dir="__rootArtifactId__-consumer" name="${rootArtifactId}-consumer">
+      <fileSets>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+          <directory>src/main/java</directory>
+          <includes>
+            <include>**/*.java</include>
+          </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+          <directory>src/main/assembly</directory>
+          <includes>
+            <include>**/*.xml</include>
+            <include>**/*.properties</include>
+          </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+          <directory>src/main/resources</directory>
+          <includes>
+            <include>**/*.xml</include>
+          </includes>
+        </fileSet>
+        <fileSet filtered="true" packaged="true" encoding="UTF-8">
+          <directory>src/test/java</directory>
+          <includes>
+            <include>**/*.java</include>
+          </includes>
+        </fileSet>
+        <fileSet filtered="true" encoding="UTF-8">
+          <directory>src/test/resources</directory>
+          <includes>
+            <include>**/*.xml</include>
+          </includes>
+        </fileSet>
+      </fileSets>
+    </module>
+  </modules>
+</archetype-descriptor>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
new file mode 100644
index 0000000000..0e6f85553e
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>${groupId}</groupId>
+        <artifactId>${rootArtifactId}</artifactId>
+        <version>${version}</version>
+    </parent>
+    <artifactId>${artifactId}</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>true</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/SerializationOptimizerImpl.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/SerializationOptimizerImpl.java
new file mode 100644
index 0000000000..51c2ea26f9
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/SerializationOptimizerImpl.java
@@ -0,0 +1,40 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package};
+
+import com.alibaba.dubbo.common.serialize.support.SerializationOptimizer;
+import ${package}.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<Class> getSerializableClasses() {
+        List<Class> classes = new LinkedList<Class>();
+        classes.add(User.class);
+        return classes;
+    }
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/ClientTraceFilter.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/ClientTraceFilter.java
new file mode 100644
index 0000000000..b626753c5d
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/ClientTraceFilter.java
@@ -0,0 +1,39 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/CustomExceptionMapper.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/CustomExceptionMapper.java
new file mode 100644
index 0000000000..a2ed960e38
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/CustomExceptionMapper.java
@@ -0,0 +1,37 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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<NotFoundException> {
+
+    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-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceBinding.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceBinding.java
new file mode 100644
index 0000000000..ae97a785da
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceBinding.java
@@ -0,0 +1,33 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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);
+    }
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceInterceptor.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceInterceptor.java
new file mode 100644
index 0000000000..8418dcd253
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/DynamicTraceInterceptor.java
@@ -0,0 +1,45 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceFilter.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceFilter.java
new file mode 100644
index 0000000000..e760d90bc6
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceFilter.java
@@ -0,0 +1,42 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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");
+    }
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceInterceptor.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceInterceptor.java
new file mode 100644
index 0000000000..2c969205ee
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/extension/TraceInterceptor.java
@@ -0,0 +1,45 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/User.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/User.java
new file mode 100644
index 0000000000..556de6f438
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/User.java
@@ -0,0 +1,80 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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 + '${symbol_escape}'' +
+                ')';
+    }
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/UserService.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/UserService.java
new file mode 100644
index 0000000000..240260c533
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/UserService.java
@@ -0,0 +1,28 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.user;
+
+/**
+ * @author lishen
+ */
+public interface UserService {
+    User getUser(Long id);
+
+    Long registerUser(User user);
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/RegistrationResult.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/RegistrationResult.java
new file mode 100644
index 0000000000..bff9e83fd9
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/RegistrationResult.java
@@ -0,0 +1,48 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.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-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/UserRestService.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/UserRestService.java
new file mode 100644
index 0000000000..9118713a3a
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/java/user/facade/UserRestService.java
@@ -0,0 +1,51 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.user.facade;
+
+import ${package}.user.User;
+import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
+
+import javax.validation.constraints.Min;
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * This interface acts as some kind of service broker for the original UserService
+ * <p/>
+ * Here we want to simulate the twitter/weibo rest api, e.g.
+ * <p/>
+ * http://localhost:8888/user/1.json
+ * http://localhost:8888/user/1.xml
+ *
+ * @author lishen
+ */
+
+@Path("users")
+@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
+@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
+public interface UserRestService {
+
+    @GET
+    @Path("{id : ${symbol_escape}${symbol_escape}d+}")
+    public User getUser(@Min(value = 1L, message = "User ID must be greater than 1") @PathParam("id") Long id/*, @Context HttpServletRequest request*/);
+
+    @POST
+    @Path("register")
+    RegistrationResult registerUser(User user);
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/pom.xml
new file mode 100644
index 0000000000..8a771dd82f
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/pom.xml
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>${groupId}</groupId>
+        <artifactId>${rootArtifactId}</artifactId>
+        <version>${version}</version>
+    </parent>
+    <artifactId>${artifactId}</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo consumer module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>${groupId}</groupId>
+            <artifactId>${rootArtifactId}-api</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.alibaba</groupId>
+                                    <artifactId>dubbo</artifactId>
+                                    <version>${project.parent.version}</version>
+                                    <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
+                                    <includes>META-INF/assembly/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptor>src/main/assembly/assembly.xml</descriptor>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/assembly.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/assembly.xml
new file mode 100644
index 0000000000..3516e43dc6
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/assembly.xml
@@ -0,0 +1,42 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<!--
+ - 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.
+-->
+<assembly>
+    <id>assembly</id>
+    <formats>
+        <format>tar.gz</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>${symbol_dollar}{project.build.directory}/dubbo/META-INF/assembly/bin</directory>
+            <outputDirectory>bin</outputDirectory>
+            <fileMode>0755</fileMode>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/assembly/conf</directory>
+            <outputDirectory>conf</outputDirectory>
+            <fileMode>0644</fileMode>
+        </fileSet>
+    </fileSets>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>lib</outputDirectory>
+        </dependencySet>
+    </dependencySets>
+</assembly>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/conf/dubbo.properties b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/conf/dubbo.properties
new file mode 100644
index 0000000000..f6e6daa412
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/assembly/conf/dubbo.properties
@@ -0,0 +1,28 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+${symbol_pound}${symbol_pound}
+${symbol_pound} Copyright 1999-2011 Alibaba Group.
+${symbol_pound}  
+${symbol_pound} Licensed under the Apache License, Version 2.0 (the "License");
+${symbol_pound} you may not use this file except in compliance with the License.
+${symbol_pound} You may obtain a copy of the License at
+${symbol_pound}  
+${symbol_pound}      http://www.apache.org/licenses/LICENSE-2.0
+${symbol_pound}  
+${symbol_pound} Unless required by applicable law or agreed to in writing, software
+${symbol_pound} distributed under the License is distributed on an "AS IS" BASIS,
+${symbol_pound} WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+${symbol_pound} See the License for the specific language governing permissions and
+${symbol_pound} limitations under the License.
+${symbol_pound}${symbol_pound}
+dubbo.container=log4j,spring
+dubbo.application.name=demo-lite-consumer
+dubbo.application.owner=
+${symbol_pound}dubbo.registry.address=multicast://224.5.6.7:1234
+dubbo.registry.address=zookeeper://127.0.0.1:2181
+${symbol_pound}dubbo.registry.address=redis://127.0.0.1:6379
+${symbol_pound}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
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/java/consumer/DemoAction.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/java/consumer/DemoAction.java
new file mode 100644
index 0000000000..3ebc5e7f8c
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/java/consumer/DemoAction.java
@@ -0,0 +1,52 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 ${package}.consumer;
+
+import ${package}.user.User;
+import ${package}.user.UserService;
+import ${package}.user.facade.UserRestService;
+
+/**
+ * User: kangfoo
+ * Date: 14-12-9
+ * Time: 下午4:12
+ */
+public class DemoAction {
+
+    private UserRestService userRestService;
+    private UserService userService;
+
+    public void setUserService(UserService userService) {
+        this.userService = userService;
+    }
+
+    public void setUserRestService(UserRestService userRestService) {
+        this.userRestService = userRestService;
+    }
+
+    public void start() throws Exception {
+
+
+        User user = new User(1L, "larrypage");
+        System.out.println("SUCESS: registered user with id " + userRestService.registerUser(user).getId());
+
+        System.out.println("SUCESS: got user " + userService.getUser(1L));
+    }
+
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml
new file mode 100644
index 0000000000..ce672ebbee
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml
@@ -0,0 +1,30 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
+
+    <bean class="${package}.consumer.DemoAction" init-method="start">
+        <property name="userService" ref="userService"/>
+        <property name="userRestService" ref="userRestService"/>
+    </bean>
+
+
+</beans>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml
new file mode 100644
index 0000000000..63a302ba7e
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml
@@ -0,0 +1,24 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="demo-consumer" owner="programmer" organization="dubbox"/>
+
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+
+    <!--uncomment this if you want to test dubbo's monitor-->
+    <!--<dubbo:monitor protocol="registry"/>-->
+
+    <dubbo:reference id="userService" interface="${package}.user.UserService"/>
+    <dubbo:reference id="userRestService" interface="${package}.user.facade.UserRestService"/>
+
+    <!-- directly connect to provider to simulate the access to non-dubbo rest services -->
+    <!--<dubbo:reference id="anotherUserRestService" interface="${groupId}.dubbo.demo.user.facade.AnotherUserRestService" url="rest://localhost:8888/services/"/>-->
+
+</beans>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/DemoConsumer.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/DemoConsumer.java
new file mode 100644
index 0000000000..01ca2d6aa4
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/DemoConsumer.java
@@ -0,0 +1,27 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 ${package}.consumer;
+
+public class DemoConsumer {
+
+    public static void main(String[] args) {
+        com.alibaba.dubbo.container.Main.main(args);
+    }
+
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/RestClient.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/RestClient.java
new file mode 100644
index 0000000000..8512b02346
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/java/consumer/RestClient.java
@@ -0,0 +1,92 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.consumer;
+
+import ${package}.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");
+
+//                    }
+//                }
+//            }).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-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/resources/log4j.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/resources/log4j.xml
new file mode 100644
index 0000000000..77898f221f
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-consumer/src/test/resources/log4j.xml
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n"/>
+        </layout>
+    </appender>
+    <root>
+        <level value="INFO"/>
+        <appender-ref ref="CONSOLE"/>
+    </root>
+</log4j:configuration>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/pom.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/pom.xml
new file mode 100644
index 0000000000..3c40d82586
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/pom.xml
@@ -0,0 +1,193 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>${groupId}</groupId>
+        <artifactId>${rootArtifactId}</artifactId>
+        <version>${version}</version>
+    </parent>
+    <artifactId>${artifactId}</artifactId>
+    <packaging>war</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo provider module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>${groupId}</groupId>
+            <artifactId>${rootArtifactId}-api</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.0</version>
+            <!--<scope>provided</scope>-->
+        </dependency>
+    </dependencies>
+    <!--<build>-->
+    <!--<plugins>-->
+    <!--<plugin>-->
+    <!--<artifactId>maven-dependency-plugin</artifactId>-->
+    <!--<executions>-->
+    <!--<execution>-->
+    <!--<id>unpack</id>-->
+    <!--<phase>package</phase>-->
+    <!--<goals>-->
+    <!--<goal>unpack</goal>-->
+    <!--</goals>-->
+    <!--<configuration>-->
+    <!--<artifactItems>-->
+    <!--<artifactItem>-->
+    <!--<groupId>com.alibaba</groupId>-->
+    <!--<artifactId>dubbo</artifactId>-->
+    <!--<version>${project.parent.version}</version>-->
+    <!--<outputDirectory>${project.build.directory}/dubbo</outputDirectory>-->
+    <!--<includes>META-INF/assembly/**</includes>-->
+    <!--</artifactItem>-->
+    <!--</artifactItems>-->
+    <!--</configuration>-->
+    <!--</execution>-->
+    <!--</executions>-->
+    <!--</plugin>-->
+    <!--<plugin>-->
+    <!--<artifactId>maven-assembly-plugin</artifactId>-->
+    <!--<configuration>-->
+    <!--<descriptor>src/main/assembly/assembly.xml</descriptor>-->
+    <!--</configuration>-->
+    <!--<executions>-->
+    <!--<execution>-->
+    <!--<id>make-assembly</id>-->
+    <!--<phase>package</phase>-->
+    <!--<goals>-->
+    <!--<goal>single</goal>-->
+    <!--</goals>-->
+    <!--</execution>-->
+    <!--</executions>-->
+    <!--</plugin>-->
+    <!--</plugins>-->
+    <!--</build>-->
+
+
+</project>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/UserServiceImpl.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/UserServiceImpl.java
new file mode 100644
index 0000000000..b084730140
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/UserServiceImpl.java
@@ -0,0 +1,41 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.user;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * User: kangfoo
+ * Date: 14-12-9
+ * Time: 下午3:45
+ */
+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-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/facade/UserRestServiceImpl.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/facade/UserRestServiceImpl.java
new file mode 100644
index 0000000000..3bf9cf567c
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/java/user/facade/UserRestServiceImpl.java
@@ -0,0 +1,66 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/**
+ * 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 ${package}.user.facade;
+
+import ${package}.user.User;
+import ${package}.user.UserService;
+import com.alibaba.dubbo.rpc.RpcContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.Min;
+import javax.ws.rs.PathParam;
+
+/**
+ * User: kangfoo
+ * Date: 14-12-9
+ * Time: 下午3:45
+ */
+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;
+    }
+
+    @Override
+    public User getUser(@Min(value = 1L, message = "User ID must be greater than 1") @PathParam("id") Long id) {
+        // 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);
+    }
+
+    @Override
+    public RegistrationResult registerUser(User user) {
+        return new RegistrationResult(userService.registerUser(user));
+    }
+
+}
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml
new file mode 100644
index 0000000000..bee031cc66
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml
@@ -0,0 +1,80 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="demo-lite-provider" owner="programmer" organization="dubbox"/>
+
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+
+    <!--uncomment this if you want to test dubbo's monitor-->
+    <!--<dubbo:monitor protocol="registry"/>-->
+
+    <!-- here we demonstrate both annotation-based and xml-based configs -->
+    <dubbo:annotation package="${package}.user.facade"/>
+
+    <dubbo:protocol name="dubbo" serialization="kryo"
+                    optimizer="${package}.SerializationOptimizerImpl"/>
+    <!--<dubbo:protocol name="dubbo" serialization="fst" optimizer="${package}.SerializationOptimizerImpl"/>-->
+
+    <!--<dubbo:protocol name="dubbo" serialization="nativejava"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="hessian2"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="fastjson"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="dubbo"/>-->
+
+
+    <!--TODO according to the spring convention, we should use something like keep-alive-->
+    <!-- use netty server -->
+    <!--<dubbo:protocol name="rest" port="8888" keepalive="true" server="netty" iothreads="5" threads="100" contextpath="services"/>-->
+
+    <!-- use tjws server -->
+    <!--<dubbo:protocol name="rest" port="8888" server="tjws" contextpath="services"/>-->
+
+    <!-- use tomcat server -->
+    <dubbo:protocol name="rest" port="8888" threads="500" contextpath="services" server="tomcat" accepts="500"
+                    extension="${package}.extension.TraceInterceptor,
+                    ${package}.extension.TraceFilter,
+                    ${package}.extension.ClientTraceFilter,
+                    ${package}.extension.DynamicTraceBinding,
+                    ${package}.extension.CustomExceptionMapper,
+                    com.alibaba.dubbo.rpc.protocol.rest.support.LoggingFilter"/>
+
+    <!-- use the external tomcat or other server with the servlet approach; the port and contextpath must be exactly the same as those in external server -->
+    <!--<dubbo:protocol name="rest" port="8888" contextpath="services" server="servlet"/>-->
+
+    <dubbo:protocol name="http" port="8889"/>
+    <dubbo:protocol name="hessian" port="8890"/>
+    <dubbo:protocol name="webservice" port="8892"/>
+
+
+    <dubbo:service interface="${package}.user.facade.UserRestService" ref="userRestService"
+                   protocol="rest" validation="true" timeout="2000" connections="100"/>
+    <dubbo:service interface="${package}.user.UserService" ref="userService" protocol="dubbo"
+                   validation="true" timeout="2000" connections="100"/>
+
+    <bean id="userService" class="${package}.user.UserServiceImpl"/>
+
+    <bean id="userRestService" class="${package}.user.facade.UserRestServiceImpl">
+        <property name="userService" ref="userService"/>
+    </bean>
+</beans>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/log4j.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/log4j.xml
new file mode 100644
index 0000000000..77898f221f
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/resources/log4j.xml
@@ -0,0 +1,31 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n"/>
+        </layout>
+    </appender>
+    <root>
+        <level value="INFO"/>
+        <appender-ref ref="CONSOLE"/>
+    </root>
+</log4j:configuration>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/webapp/WEB-INF/web.xml b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..f9cf14fa67
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,33 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>/WEB-INF/classes/META-INF/spring/dubbo-demo-lite-provider.xml</param-value>
+    </context-param>
+
+    <!--this listener must be defined before the spring listener-->
+    <listener>
+        <listener-class>com.alibaba.dubbo.remoting.http.servlet.BootstrapListener</listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+</web-app>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/test/java/provider/DemoProvider.java b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/test/java/provider/DemoProvider.java
new file mode 100644
index 0000000000..258856f9e5
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/__rootArtifactId__-provider/src/test/java/provider/DemoProvider.java
@@ -0,0 +1,37 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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 ${package}.provider;
+
+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);
+    }
+
+}
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
new file mode 100644
index 0000000000..561a683e50
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/main/resources/archetype-resources/pom.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+ - 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.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-parent</artifactId>
+        <version>2.8.4</version>
+    </parent>
+    <artifactId>${artifactId}</artifactId>
+    <groupId>${groupId}</groupId>
+    <packaging>pom</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo lite module of dubbo project</description>
+    <version>${version}</version>
+    <properties>
+        <skip_maven_deploy>true</skip_maven_deploy>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>dubbo</artifactId>
+                <version>2.8.4</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>
diff --git a/dubbo-tool/dubbo-demo-lite-archetype/src/test/resources/projects/basic/archetype.properties b/dubbo-tool/dubbo-demo-lite-archetype/src/test/resources/projects/basic/archetype.properties
new file mode 100644
index 0000000000..dc09b753b7
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite-archetype/src/test/resources/projects/basic/archetype.properties
@@ -0,0 +1,5 @@
+#Thu Dec 11 15:57:06 CST 2014
+package=it.pkg
+version=0.1-SNAPSHOT
+groupId=archetype.it
+artifactId=basic
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
new file mode 100644
index 0000000000..fb06b64047
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/pom.xml
@@ -0,0 +1,45 @@
+<!--
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.alibaba</groupId>
+		<artifactId>dubbo-demo-lite</artifactId>
+		<version>2.8.4</version>
+	</parent>
+	<artifactId>dubbo-demo-lite-api</artifactId>
+	<packaging>jar</packaging>
+	<name>${project.artifactId}</name>
+	<description>The demo module of dubbo project</description>
+	<properties>
+		<skip_maven_deploy>true</skip_maven_deploy>
+	</properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/SerializationOptimizerImpl.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/SerializationOptimizerImpl.java
new file mode 100644
index 0000000000..f82006a14c
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/SerializationOptimizerImpl.java
@@ -0,0 +1,37 @@
+/**
+ * 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.demolite;
+
+import com.alibaba.dubbo.common.serialize.support.SerializationOptimizer;
+import com.alibaba.dubbo.demolite.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<Class> getSerializableClasses() {
+        List<Class> classes = new LinkedList<Class>();
+        classes.add(User.class);
+        return classes;
+    }
+}
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/ClientTraceFilter.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/ClientTraceFilter.java
new file mode 100644
index 0000000000..108b09fbc2
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/ClientTraceFilter.java
@@ -0,0 +1,36 @@
+/**
+ * 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.demolite.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-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/CustomExceptionMapper.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/CustomExceptionMapper.java
new file mode 100644
index 0000000000..d73838a18e
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/CustomExceptionMapper.java
@@ -0,0 +1,34 @@
+/**
+ * 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.demolite.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<NotFoundException> {
+
+    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-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceBinding.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceBinding.java
new file mode 100644
index 0000000000..eaf81d4d55
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceBinding.java
@@ -0,0 +1,30 @@
+/**
+ * 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.demolite.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);
+    }
+}
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceInterceptor.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceInterceptor.java
new file mode 100644
index 0000000000..8f6a249e1f
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/DynamicTraceInterceptor.java
@@ -0,0 +1,42 @@
+/**
+ * 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.demolite.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-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceFilter.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceFilter.java
new file mode 100644
index 0000000000..457a28fde8
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceFilter.java
@@ -0,0 +1,39 @@
+/**
+ * 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.demolite.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");
+    }
+}
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceInterceptor.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceInterceptor.java
new file mode 100644
index 0000000000..4354f90850
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/extension/TraceInterceptor.java
@@ -0,0 +1,42 @@
+/**
+ * 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.demolite.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-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/User.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/User.java
new file mode 100644
index 0000000000..005ff3794a
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/User.java
@@ -0,0 +1,77 @@
+/**
+ * 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.demolite.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-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/UserService.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/UserService.java
new file mode 100644
index 0000000000..43b5030675
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/UserService.java
@@ -0,0 +1,25 @@
+/**
+ * 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.demolite.user;
+
+/**
+ * @author lishen
+ */
+public interface UserService {
+    User getUser(Long id);
+
+    Long registerUser(User user);
+}
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/RegistrationResult.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/RegistrationResult.java
new file mode 100644
index 0000000000..c58f7d73d1
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/RegistrationResult.java
@@ -0,0 +1,45 @@
+/**
+ * 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.demolite.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-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestService.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestService.java
new file mode 100644
index 0000000000..b753eea68b
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-api/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestService.java
@@ -0,0 +1,48 @@
+/**
+ * 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.demolite.user.facade;
+
+import com.alibaba.dubbo.demolite.user.User;
+import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;
+
+import javax.validation.constraints.Min;
+import javax.ws.rs.*;
+import javax.ws.rs.core.MediaType;
+
+/**
+ * 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
+ */
+
+@Path("users")
+@Consumes({MediaType.APPLICATION_JSON, MediaType.TEXT_XML})
+@Produces({ContentType.APPLICATION_JSON_UTF_8, ContentType.TEXT_XML_UTF_8})
+public interface UserRestService {
+
+    @GET
+    @Path("{id : \\d+}")
+    public User getUser(@Min(value=1L, message="User ID must be greater than 1") @PathParam("id") Long id/*, @Context HttpServletRequest request*/) ;
+
+    @POST
+    @Path("register")
+    RegistrationResult registerUser(User user);
+}
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
new file mode 100644
index 0000000000..e59c2df090
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/pom.xml
@@ -0,0 +1,180 @@
+<!--
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-demo-lite</artifactId>
+        <version>2.8.4</version>
+    </parent>
+    <artifactId>dubbo-demo-lite-consumer</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The demo consumer module of dubbo project</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-demo-lite-api</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>unpack</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>com.alibaba</groupId>
+                                    <artifactId>dubbo</artifactId>
+                                    <version>${project.parent.version}</version>
+                                    <outputDirectory>${project.build.directory}/dubbo</outputDirectory>
+                                    <includes>META-INF/assembly/**</includes>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptor>src/main/assembly/assembly.xml</descriptor>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
diff --git a/dubbo-demo/dubbo-demo-provider/src/main/assembly/assembly.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/assembly.xml
similarity index 96%
rename from dubbo-demo/dubbo-demo-provider/src/main/assembly/assembly.xml
rename to dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/assembly.xml
index 25235d9064..1bdbe518dc 100644
--- a/dubbo-demo/dubbo-demo-provider/src/main/assembly/assembly.xml
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/assembly.xml
@@ -1,39 +1,39 @@
-<!--
- - 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.
--->
-<assembly>
-	<id>assembly</id>
-	<formats>
-		<format>tar.gz</format>
-	</formats>
-	<includeBaseDirectory>true</includeBaseDirectory>
-	<fileSets>
-		<fileSet>
-			<directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
-			<outputDirectory>bin</outputDirectory>
-			<fileMode>0755</fileMode>
-		</fileSet>
-		<fileSet>
-			<directory>src/main/assembly/conf</directory>
-			<outputDirectory>conf</outputDirectory>
-			<fileMode>0644</fileMode>
-		</fileSet>
-	</fileSets>
-	<dependencySets>
-		<dependencySet>
-			<outputDirectory>lib</outputDirectory>
-		</dependencySet>
-	</dependencySets>
-</assembly>
\ No newline at end of file
+<!--
+ - 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.
+-->
+<assembly>
+	<id>assembly</id>
+	<formats>
+		<format>tar.gz</format>
+	</formats>
+	<includeBaseDirectory>true</includeBaseDirectory>
+	<fileSets>
+		<fileSet>
+			<directory>${project.build.directory}/dubbo/META-INF/assembly/bin</directory>
+			<outputDirectory>bin</outputDirectory>
+			<fileMode>0755</fileMode>
+		</fileSet>
+		<fileSet>
+			<directory>src/main/assembly/conf</directory>
+			<outputDirectory>conf</outputDirectory>
+			<fileMode>0644</fileMode>
+		</fileSet>
+	</fileSets>
+	<dependencySets>
+		<dependencySet>
+			<outputDirectory>lib</outputDirectory>
+		</dependencySet>
+	</dependencySets>
+</assembly>
diff --git a/dubbo-demo/dubbo-demo-consumer/src/test/resources/dubbo.properties b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/conf/dubbo.properties
similarity index 73%
rename from dubbo-demo/dubbo-demo-consumer/src/test/resources/dubbo.properties
rename to dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/conf/dubbo.properties
index 32723f9c1b..8d1835e8f0 100644
--- a/dubbo-demo/dubbo-demo-consumer/src/test/resources/dubbo.properties
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/assembly/conf/dubbo.properties
@@ -1,25 +1,25 @@
-##
-# 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
+##
+# 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-lite-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
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/java/com/alibaba/dubbo/demolite/consumer/DemoAction.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/java/com/alibaba/dubbo/demolite/consumer/DemoAction.java
new file mode 100644
index 0000000000..32699c7b51
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/java/com/alibaba/dubbo/demolite/consumer/DemoAction.java
@@ -0,0 +1,50 @@
+/*
+ * 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.demolite.consumer;
+
+import com.alibaba.dubbo.demolite.user.User;
+import com.alibaba.dubbo.demolite.user.UserService;
+import com.alibaba.dubbo.demolite.user.facade.UserRestService;
+
+/**
+ *
+ * User: kangfoo
+ * Date: 14-12-9
+ * Time: 下午4:12
+ */
+public class DemoAction {
+
+    private UserRestService userRestService;
+    private UserService userService;
+
+    public void setUserService(UserService userService) {
+        this.userService = userService;
+    }
+
+    public void setUserRestService(UserRestService userRestService) {
+        this.userRestService = userRestService;
+    }
+
+    public void start() throws Exception {
+
+
+        User user = new User(1L, "larrypage");
+        System.out.println("SUCESS: registered user with id " + userRestService.registerUser(user).getId());
+
+        System.out.println("SUCESS: got user " + userService.getUser(1L));
+    }
+
+}
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml
new file mode 100644
index 0000000000..c0aa4f9b6e
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-action.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <bean class="com.alibaba.dubbo.demolite.consumer.DemoAction" init-method="start">
+		<property name="userService" ref="userService" />
+		<property name="userRestService" ref="userRestService" />
+	</bean>
+
+
+</beans>
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml
new file mode 100644
index 0000000000..88f5164cbd
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/main/resources/META-INF/spring/dubbo-demo-lite-consumer.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="demo-consumer" owner="programmer" organization="dubbox"/>
+
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+
+    <!--uncomment this if you want to test dubbo's monitor-->
+    <!--<dubbo:monitor protocol="registry"/>-->
+
+    <dubbo:reference id="userService" interface="com.alibaba.dubbo.demolite.user.UserService"/>
+    <dubbo:reference id="userRestService" interface="com.alibaba.dubbo.demolite.user.facade.UserRestService"/>
+
+    <!-- directly connect to provider to simulate the access to non-dubbo rest services -->
+    <!--<dubbo:reference id="anotherUserRestService" interface="com.alibaba.dubbo.demo.user.facade.AnotherUserRestService" url="rest://localhost:8888/services/"/>-->
+
+</beans>
diff --git a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/DemoService.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/DemoConsumer.java
similarity index 78%
rename from dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/DemoService.java
rename to dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/DemoConsumer.java
index 7dda95f2d7..e87a3f3acc 100644
--- a/dubbo-demo/dubbo-demo-api/src/main/java/com/alibaba/dubbo/demo/DemoService.java
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/DemoConsumer.java
@@ -1,22 +1,24 @@
-/*
- * 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;
-
-public interface DemoService {
-
-	String sayHello(String name);
-
-}
\ No newline at end of file
+/*
+ * 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.demolite.consumer;
+
+public class DemoConsumer {
+	
+	public static void main(String[] args) {
+	    com.alibaba.dubbo.container.Main.main(args);
+	}
+
+}
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/RestClient.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/RestClient.java
new file mode 100644
index 0000000000..5e4942160b
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/java/com/alibaba/dubbo/demolite/consumer/RestClient.java
@@ -0,0 +1,89 @@
+/**
+ * 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.demolite.consumer;
+
+import com.alibaba.dubbo.demolite.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");
+
+//                    }
+//                }
+//            }).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-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/resources/log4j.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/resources/log4j.xml
new file mode 100644
index 0000000000..5375cc32f3
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-consumer/src/test/resources/log4j.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+		<layout class="org.apache.log4j.PatternLayout">
+			<param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n" />
+		</layout>
+	</appender>
+	<root>
+		<level value="INFO" />
+		<appender-ref ref="CONSOLE" />
+	</root>
+</log4j:configuration>
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
new file mode 100644
index 0000000000..ab2cead41c
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/pom.xml
@@ -0,0 +1,195 @@
+<!--
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-demo-lite</artifactId>
+        <version>2.8.4</version>
+    </parent>
+	<artifactId>dubbo-demo-lite-provider</artifactId>
+	<packaging>war</packaging>
+	<name>${project.artifactId}</name>
+	<description>The demo provider module of dubbo project</description>
+	<properties>
+		<skip_maven_deploy>false</skip_maven_deploy>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>dubbo-demo-lite-api</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>dubbo</artifactId>
+			<version>${project.parent.version}</version>
+		</dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.netty</groupId>
+            <artifactId>netty</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.mina</groupId>
+            <artifactId>mina-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.glassfish.grizzly</groupId>
+            <artifactId>grizzly-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.bsf</groupId>
+            <artifactId>bsf-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.zookeeper</groupId>
+            <artifactId>zookeeper</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.sgroschupf</groupId>
+            <artifactId>zkclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.curator</groupId>
+            <artifactId>curator-framework</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.xmemcached</groupId>
+            <artifactId>xmemcached</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-simple</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.thrift</groupId>
+            <artifactId>libthrift</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.caucho</groupId>
+            <artifactId>hessian</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.cache</groupId>
+            <artifactId>cache-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+            <version>2.0</version>
+            <!--<scope>provided</scope>-->
+        </dependency>
+	</dependencies>
+	<!--<build>-->
+		<!--<plugins>-->
+			<!--<plugin>-->
+				<!--<artifactId>maven-dependency-plugin</artifactId>-->
+				<!--<executions>-->
+					<!--<execution>-->
+						<!--<id>unpack</id>-->
+						<!--<phase>package</phase>-->
+						<!--<goals>-->
+							<!--<goal>unpack</goal>-->
+						<!--</goals>-->
+						<!--<configuration>-->
+							<!--<artifactItems>-->
+								<!--<artifactItem>-->
+									<!--<groupId>com.alibaba</groupId>-->
+									<!--<artifactId>dubbo</artifactId>-->
+									<!--<version>${project.parent.version}</version>-->
+									<!--<outputDirectory>${project.build.directory}/dubbo</outputDirectory>-->
+									<!--<includes>META-INF/assembly/**</includes>-->
+								<!--</artifactItem>-->
+							<!--</artifactItems>-->
+						<!--</configuration>-->
+					<!--</execution>-->
+				<!--</executions>-->
+			<!--</plugin>-->
+			<!--<plugin>-->
+				<!--<artifactId>maven-assembly-plugin</artifactId>-->
+                <!--<configuration>-->
+                    <!--<descriptor>src/main/assembly/assembly.xml</descriptor>-->
+                <!--</configuration>-->
+                <!--<executions>-->
+					<!--<execution>-->
+						<!--<id>make-assembly</id>-->
+						<!--<phase>package</phase>-->
+						<!--<goals>-->
+							<!--<goal>single</goal>-->
+						<!--</goals>-->
+					<!--</execution>-->
+				<!--</executions>-->
+            <!--</plugin>-->
+		<!--</plugins>-->
+	<!--</build>-->
+
+
+</project>
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/UserServiceImpl.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/UserServiceImpl.java
new file mode 100644
index 0000000000..837a0bc8be
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/UserServiceImpl.java
@@ -0,0 +1,38 @@
+/**
+ * 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.demolite.user;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+/**
+ * User: kangfoo
+ * Date: 14-12-9
+ * Time: 下午3:45
+ */
+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-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestServiceImpl.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestServiceImpl.java
new file mode 100644
index 0000000000..ccbaa904ce
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/java/com/alibaba/dubbo/demolite/user/facade/UserRestServiceImpl.java
@@ -0,0 +1,63 @@
+/**
+ * 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.demolite.user.facade;
+
+import com.alibaba.dubbo.demolite.user.User;
+import com.alibaba.dubbo.demolite.user.UserService;
+import com.alibaba.dubbo.rpc.RpcContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.constraints.Min;
+import javax.ws.rs.PathParam;
+
+/**
+ * User: kangfoo
+ * Date: 14-12-9
+ * Time: 下午3:45
+ */
+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;
+    }
+
+    @Override
+    public User getUser(@Min(value = 1L, message = "User ID must be greater than 1") @PathParam("id") Long id) {
+        // 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);
+    }
+
+    @Override
+    public RegistrationResult registerUser(User user) {
+        return new RegistrationResult(userService.registerUser(user));
+    }
+
+}
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml
new file mode 100644
index 0000000000..3d4f93e308
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/META-INF/spring/dubbo-demo-lite-provider.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
+	http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
+
+    <dubbo:application name="demo-lite-provider" owner="programmer" organization="dubbox"/>
+
+    <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+
+    <!--uncomment this if you want to test dubbo's monitor-->
+    <!--<dubbo:monitor protocol="registry"/>-->
+
+    <!-- here we demonstrate both annotation-based and xml-based configs -->
+    <dubbo:annotation package="com.alibaba.dubbo.demolite.user.facade" />
+
+    <dubbo:protocol name="dubbo" serialization="kryo" optimizer="com.alibaba.dubbo.demolite.SerializationOptimizerImpl"/>
+    <!--<dubbo:protocol name="dubbo" serialization="fst" optimizer="com.alibaba.dubbo.demolite.SerializationOptimizerImpl"/>-->
+
+    <!--<dubbo:protocol name="dubbo" serialization="nativejava"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="hessian2"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="fastjson"/>-->
+    <!--<dubbo:protocol name="dubbo" serialization="dubbo"/>-->
+
+
+    <!--TODO according to the spring convention, we should use something like keep-alive-->
+    <!-- use netty server -->
+    <!--<dubbo:protocol name="rest" port="8888" keepalive="true" server="netty" iothreads="5" threads="100" contextpath="services"/>-->
+
+    <!-- use tjws server -->
+    <!--<dubbo:protocol name="rest" port="8888" server="tjws" contextpath="services"/>-->
+
+    <!-- use tomcat server -->
+    <dubbo:protocol name="rest" port="8888" threads="500" contextpath="services" server="tomcat" accepts="500"
+                    extension="com.alibaba.dubbo.demolite.extension.TraceInterceptor,
+                    com.alibaba.dubbo.demolite.extension.TraceFilter,
+                    com.alibaba.dubbo.demolite.extension.ClientTraceFilter,
+                    com.alibaba.dubbo.demolite.extension.DynamicTraceBinding,
+                    com.alibaba.dubbo.demolite.extension.CustomExceptionMapper,
+                    com.alibaba.dubbo.rpc.protocol.rest.support.LoggingFilter"/>
+
+    <!-- use the external tomcat or other server with the servlet approach; the port and contextpath must be exactly the same as those in external server -->
+    <!--<dubbo:protocol name="rest" port="8888" contextpath="services" server="servlet"/>-->
+
+    <dubbo:protocol name="http" port="8889"/>
+    <dubbo:protocol name="hessian" port="8890"/>
+    <dubbo:protocol name="webservice" port="8892"/>
+
+
+
+	<dubbo:service interface="com.alibaba.dubbo.demolite.user.facade.UserRestService" ref="userRestService"  protocol="rest" validation="true" timeout="2000" connections="100" />
+    <dubbo:service interface="com.alibaba.dubbo.demolite.user.UserService" ref="userService"  protocol="dubbo" validation="true" timeout="2000" connections="100" />
+
+    <bean id="userService" class="com.alibaba.dubbo.demolite.user.UserServiceImpl" />
+
+    <bean id="userRestService" class="com.alibaba.dubbo.demolite.user.facade.UserRestServiceImpl">
+        <property name="userService" ref="userService"/>
+    </bean>
+</beans>
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/log4j.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/log4j.xml
new file mode 100644
index 0000000000..33bf5d8a72
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/resources/log4j.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ - 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.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+        <layout class="org.apache.log4j.PatternLayout">
+            <param name="ConversionPattern" value="[%d{dd/MM/yy hh:mm:ss:sss z}] %t %5p %c{2}: %m%n"/>
+        </layout>
+    </appender>
+    <root>
+        <level value="INFO"/>
+        <appender-ref ref="CONSOLE"/>
+    </root>
+</log4j:configuration>
\ No newline at end of file
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/webapp/WEB-INF/web.xml b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..242c3741c5
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>/WEB-INF/classes/META-INF/spring/dubbo-demo-lite-provider.xml</param-value>
+    </context-param>
+
+    <!--this listener must be defined before the spring listener-->
+    <listener>
+        <listener-class>com.alibaba.dubbo.remoting.http.servlet.BootstrapListener</listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <servlet>
+        <servlet-name>dispatcher</servlet-name>
+        <servlet-class>com.alibaba.dubbo.remoting.http.servlet.DispatcherServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+    <servlet-mapping>
+        <servlet-name>dispatcher</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+</web-app>
diff --git a/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/test/java/com/alibaba/dubbo/demolite/provider/DemoProvider.java b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/test/java/com/alibaba/dubbo/demolite/provider/DemoProvider.java
new file mode 100644
index 0000000000..eaa78d67af
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/dubbo-demo-lite-provider/src/test/java/com/alibaba/dubbo/demolite/provider/DemoProvider.java
@@ -0,0 +1,34 @@
+/*
+ * 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.demolite.provider;
+
+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);
+    }
+
+}
diff --git a/dubbo-tool/dubbo-demo-lite/pom.xml b/dubbo-tool/dubbo-demo-lite/pom.xml
new file mode 100644
index 0000000000..b43142ae69
--- /dev/null
+++ b/dubbo-tool/dubbo-demo-lite/pom.xml
@@ -0,0 +1,46 @@
+<!-- 
+ - 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.alibaba</groupId>
+		<artifactId>dubbo-parent</artifactId>
+		<version>2.8.4</version>
+	</parent>
+	<artifactId>dubbo-demo-lite</artifactId>
+	<packaging>pom</packaging>
+	<name>${project.artifactId}</name>
+	<description>The demo lite module of dubbo project</description>
+	<properties>
+		<skip_maven_deploy>true</skip_maven_deploy>
+	</properties>
+	<modules>
+		<module>dubbo-demo-lite-api</module>
+		<module>dubbo-demo-lite-provider</module>
+		<module>dubbo-demo-lite-consumer</module>
+	</modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>dubbo</artifactId>
+                <version>2.8.4</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+</project>
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index 52f38760de..1ff4074b88 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -14,467 +14,532 @@
  - limitations under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>com.alibaba</groupId>
-		<artifactId>dubbo-parent</artifactId>
-		<version>2.5.4-SNAPSHOT</version>
-	</parent>
-	<artifactId>dubbo</artifactId>
-	<packaging>jar</packaging>
-	<name>${project.artifactId}</name>
-	<description>The all in one project of dubbo</description>
-	<properties>
-		<skip_maven_deploy>false</skip_maven_deploy>
-	</properties>
-	<dependencies>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-config-api</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.mortbay.jetty</groupId>
-					<artifactId>jetty</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-config-spring</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-remoting-netty</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-remoting-mina</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.apache.mina</groupId>
-					<artifactId>mina-core</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.slf4j</groupId>
-					<artifactId>slf4j-api</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-remoting-grizzly</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.glassfish.grizzly</groupId>
-					<artifactId>grizzly-core</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-remoting-p2p</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-remoting-http</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.mortbay.jetty</groupId>
-					<artifactId>jetty</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.apache.httpcomponents</groupId>
-		    		<artifactId>httpclient</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-default</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-injvm</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-rmi</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-hessian</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>com.caucho</groupId>
-    				<artifactId>hessian</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-http</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>com.caucho</groupId>
-    				<artifactId>hessian</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-webservice</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.apache.cxf</groupId>
-					<artifactId>cxf-rt-frontend-simple</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>org.apache.cxf</groupId>
-					<artifactId>cxf-rt-transports-http</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-thrift</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.apache.thrift</groupId>
-					<artifactId>libthrift</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-memcached</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>com.googlecode.xmemcached</groupId>
-		    		<artifactId>xmemcached</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-rpc-redis</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>redis.clients</groupId>
-					<artifactId>jedis</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-registry-default</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-registry-multicast</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-registry-zookeeper</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.apache.zookeeper</groupId>
-		    		<artifactId>zookeeper</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.github.sgroschupf</groupId>
-					<artifactId>zkclient</artifactId>
-				</exclusion>
-				<exclusion>
-					<groupId>com.netflix.curator</groupId>
-					<artifactId>curator-framework</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-registry-redis</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>redis.clients</groupId>
-					<artifactId>jedis</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-monitor-default</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-container-spring</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-container-jetty</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>org.mortbay.jetty</groupId>
-					<artifactId>jetty</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-container-log4j</artifactId>
-			<version>${project.parent.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>com.alibaba</groupId>
-			<artifactId>dubbo-container-logback</artifactId>
-			<version>${project.parent.version}</version>
-			<exclusions>
-				<exclusion>
-					<groupId>ch.qos.logback</groupId>
-					<artifactId>logback-classic</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<artifactId>maven-source-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>attach-sources</id>
-						<phase>none</phase>
-					</execution>
-				</executions>
-			</plugin>
-			<plugin>
-				<artifactId>maven-javadoc-plugin</artifactId>
-				<executions>
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.alibaba</groupId>
+        <artifactId>dubbo-parent</artifactId>
+        <version>2.8.4</version>
+    </parent>
+    <artifactId>dubbo</artifactId>
+    <packaging>jar</packaging>
+    <name>${project.artifactId}</name>
+    <description>The all in one project of dubbo</description>
+    <properties>
+        <skip_maven_deploy>false</skip_maven_deploy>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-config-api</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>jetty</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-config-spring</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-netty</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-mina</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.mina</groupId>
+                    <artifactId>mina-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-grizzly</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.glassfish.grizzly</groupId>
+                    <artifactId>grizzly-core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-p2p</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-remoting-http</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>jetty</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tomcat.embed</groupId>
+                    <artifactId>tomcat-embed-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.tomcat.embed</groupId>
+                    <artifactId>tomcat-embed-logging-juli</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-default</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-injvm</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-rmi</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-hessian</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.caucho</groupId>
+                    <artifactId>hessian</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-http</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.caucho</groupId>
+                    <artifactId>hessian</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-webservice</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.cxf</groupId>
+                    <artifactId>cxf-rt-frontend-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.cxf</groupId>
+                    <artifactId>cxf-rt-transports-http</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-thrift</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.thrift</groupId>
+                    <artifactId>libthrift</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-memcached</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.googlecode.xmemcached</groupId>
+                    <artifactId>xmemcached</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-redis</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>redis.clients</groupId>
+                    <artifactId>jedis</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-rpc-rest</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.jboss.resteasy</groupId>
+                    <artifactId>resteasy-jaxrs</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.resteasy</groupId>
+                    <artifactId>resteasy-client</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.resteasy</groupId>
+                    <artifactId>resteasy-netty</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.resteasy</groupId>
+                    <artifactId>resteasy-jdk-http</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.resteasy</groupId>
+                    <artifactId>resteasy-undertow</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.undertow</groupId>
+                    <artifactId>undertow-servlet</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.undertow</groupId>
+                    <artifactId>undertow-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.resteasy</groupId>
+                    <artifactId>resteasy-jackson-provider</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jboss.resteasy</groupId>
+                    <artifactId>resteasy-jaxb-provider</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.validation</groupId>
+                    <artifactId>validation-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-default</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-multicast</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-zookeeper</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.zookeeper</groupId>
+                    <artifactId>zookeeper</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.github.sgroschupf</groupId>
+                    <artifactId>zkclient</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>com.netflix.curator</groupId>
+                    <artifactId>curator-framework</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-registry-redis</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>redis.clients</groupId>
+                    <artifactId>jedis</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-monitor-default</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-spring</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-javaconfig</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-jetty</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>jetty</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-log4j</artifactId>
+            <version>${project.parent.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>dubbo-container-logback</artifactId>
+            <version>${project.parent.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>ch.qos.logback</groupId>
+                    <artifactId>logback-classic</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-source-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <executions>
                     <execution>
                         <id>attach-javadoc</id>
-						<phase>deploy</phase>
+                        <phase>deploy</phase>
                         <goals>
                             <goal>jar</goal>
                         </goals>
                     </execution>
                 </executions>
-				<configuration>
-					<show>public</show>
-					<charset>UTF-8</charset>
-					<encoding>UTF-8</encoding>
-					<docencoding>UTF-8</docencoding>
-					<excludePackageNames>com.alibaba.com.*</excludePackageNames>
-					<links>
-						<link>http://docs.oracle.com/javase/6/docs/api</link>
-					</links>
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-shade-plugin</artifactId>
-				<version>1.4</version>
-				<executions>
-					<execution>
-						<phase>package</phase>
-						<goals>
-							<goal>shade</goal>
-						</goals>
-						<configuration>
-							<createSourcesJar>true</createSourcesJar>
-							<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-							<artifactSet>
-								<includes>
-								    <include>com.alibaba:hessian-lite</include>
-									<include>com.alibaba:dubbo-common</include>
-									<include>com.alibaba:dubbo-remoting-api</include>
-									<include>com.alibaba:dubbo-remoting-netty</include>
-									<include>com.alibaba:dubbo-remoting-mina</include>
-									<include>com.alibaba:dubbo-remoting-grizzly</include>
-									<include>com.alibaba:dubbo-remoting-p2p</include>
-									<include>com.alibaba:dubbo-remoting-http</include>
-									<include>com.alibaba:dubbo-remoting-zookeeper</include>
-									<include>com.alibaba:dubbo-rpc-api</include>
-									<include>com.alibaba:dubbo-rpc-default</include>
-									<include>com.alibaba:dubbo-rpc-injvm</include>
-									<include>com.alibaba:dubbo-rpc-rmi</include>
-									<include>com.alibaba:dubbo-rpc-hessian</include>
-									<include>com.alibaba:dubbo-rpc-http</include>
-									<include>com.alibaba:dubbo-rpc-webservice</include>
-									<include>com.alibaba:dubbo-rpc-thrift</include>
-									<include>com.alibaba:dubbo-rpc-memcached</include>
-									<include>com.alibaba:dubbo-rpc-redis</include>
-									<include>com.alibaba:dubbo-filter-validation</include>
-									<include>com.alibaba:dubbo-filter-cache</include>
-									<include>com.alibaba:dubbo-cluster</include>
-									<include>com.alibaba:dubbo-registry-api</include>
-									<include>com.alibaba:dubbo-registry-default</include>
-									<include>com.alibaba:dubbo-registry-multicast</include>
-									<include>com.alibaba:dubbo-registry-zookeeper</include>
-									<include>com.alibaba:dubbo-registry-redis</include>
-									<include>com.alibaba:dubbo-monitor-api</include>
-									<include>com.alibaba:dubbo-monitor-default</include>
-									<include>com.alibaba:dubbo-config-api</include>
-									<include>com.alibaba:dubbo-config-spring</include>
-									<include>com.alibaba:dubbo-container-api</include>
-									<include>com.alibaba:dubbo-container-spring</include>
-									<include>com.alibaba:dubbo-container-jetty</include>
-									<include>com.alibaba:dubbo-container-log4j</include>
-									<include>com.alibaba:dubbo-container-logback</include>
-								</includes>
-							</artifactSet>
-							<transformers>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.extension.ExtensionFactory</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.threadpool.ThreadPool</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Dispatcher</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Codec2</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Transporter</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.exchange.Exchanger</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.p2p.Networker</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.telnet.TelnetHandler</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Filter</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.InvokerListener</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ExporterListener</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ProxyFactory</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Cluster</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.LoadBalance</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Merger</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.RouterFactory</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.ConfiguratorFactory</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.container.Container</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.container.page.PageHandler</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.monitor.MonitorFactory</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.validation.Validation</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.cache.CacheFactory</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.store.DataStore</resource>
-								</transformer>
-								<transformer
-									implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
-									<resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.logger.LoggerAdapter</resource>
-								</transformer>
-							</transformers>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
+                <configuration>
+                    <show>public</show>
+                    <charset>UTF-8</charset>
+                    <encoding>UTF-8</encoding>
+                    <docencoding>UTF-8</docencoding>
+                    <excludePackageNames>com.alibaba.com.*</excludePackageNames>
+                    <links>
+                        <link>http://docs.oracle.com/javase/6/docs/api</link>
+                    </links>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>1.4</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <createSourcesJar>true</createSourcesJar>
+                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+                            <artifactSet>
+                                <includes>
+                                    <include>com.alibaba:hessian-lite</include>
+                                    <include>com.alibaba:dubbo-common</include>
+                                    <include>com.alibaba:dubbo-remoting-api</include>
+                                    <include>com.alibaba:dubbo-remoting-netty</include>
+                                    <include>com.alibaba:dubbo-remoting-mina</include>
+                                    <include>com.alibaba:dubbo-remoting-grizzly</include>
+                                    <include>com.alibaba:dubbo-remoting-p2p</include>
+                                    <include>com.alibaba:dubbo-remoting-http</include>
+                                    <include>com.alibaba:dubbo-remoting-zookeeper</include>
+                                    <include>com.alibaba:dubbo-rpc-api</include>
+                                    <include>com.alibaba:dubbo-rpc-default</include>
+                                    <include>com.alibaba:dubbo-rpc-injvm</include>
+                                    <include>com.alibaba:dubbo-rpc-rmi</include>
+                                    <include>com.alibaba:dubbo-rpc-hessian</include>
+                                    <include>com.alibaba:dubbo-rpc-http</include>
+                                    <include>com.alibaba:dubbo-rpc-webservice</include>
+                                    <include>com.alibaba:dubbo-rpc-thrift</include>
+                                    <include>com.alibaba:dubbo-rpc-memcached</include>
+                                    <include>com.alibaba:dubbo-rpc-redis</include>
+                                    <include>com.alibaba:dubbo-rpc-rest</include>
+                                    <include>com.alibaba:dubbo-filter-validation</include>
+                                    <include>com.alibaba:dubbo-filter-cache</include>
+                                    <include>com.alibaba:dubbo-cluster</include>
+                                    <include>com.alibaba:dubbo-registry-api</include>
+                                    <include>com.alibaba:dubbo-registry-default</include>
+                                    <include>com.alibaba:dubbo-registry-multicast</include>
+                                    <include>com.alibaba:dubbo-registry-zookeeper</include>
+                                    <include>com.alibaba:dubbo-registry-redis</include>
+                                    <include>com.alibaba:dubbo-monitor-api</include>
+                                    <include>com.alibaba:dubbo-monitor-default</include>
+                                    <include>com.alibaba:dubbo-config-api</include>
+                                    <include>com.alibaba:dubbo-config-spring</include>
+                                    <include>com.alibaba:dubbo-container-api</include>
+                                    <include>com.alibaba:dubbo-container-spring</include>
+                                    <include>com.alibaba:dubbo-container-javaconfig</include>
+                                    <include>com.alibaba:dubbo-container-jetty</include>
+                                    <include>com.alibaba:dubbo-container-log4j</include>
+                                    <include>com.alibaba:dubbo-container-logback</include>
+                                </includes>
+                            </artifactSet>
+                            <transformers>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.compiler.Compiler</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.extension.ExtensionFactory</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.serialize.Serialization</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.status.StatusChecker</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.threadpool.ThreadPool</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Dispatcher</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Codec2</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.Transporter</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.exchange.Exchanger</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.http.HttpBinder</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.p2p.Networker</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.telnet.TelnetHandler</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Protocol</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.Filter</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.InvokerListener</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ExporterListener</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.ProxyFactory</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Cluster</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.LoadBalance</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.Merger</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.RouterFactory</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.rpc.cluster.ConfiguratorFactory</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.container.Container</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.container.page.PageHandler</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.monitor.MonitorFactory</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.registry.RegistryFactory</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.validation.Validation</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.cache.CacheFactory</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.store.DataStore</resource>
+                                </transformer>
+                                <transformer
+                                        implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
+                                    <resource>META-INF/dubbo/internal/com.alibaba.dubbo.common.logger.LoggerAdapter</resource>
+                                </transformer>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file
diff --git a/hessian-lite/pom.xml b/hessian-lite/pom.xml
index 24af1c7831..c377884a45 100644
--- a/hessian-lite/pom.xml
+++ b/hessian-lite/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>com.alibaba</groupId>
         <artifactId>dubbo-parent</artifactId>
-        <version>2.5.4-SNAPSHOT</version>
+        <version>2.8.4</version>
     </parent>
     <artifactId>hessian-lite</artifactId>
     <packaging>jar</packaging>
diff --git a/pom.xml b/pom.xml
index 7cdbfb61a0..f4e69f74a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
 <!--
  - 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
- -  
+ -
+ -      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.
@@ -16,14 +16,11 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
-	<!--<parent>
-		<groupId>com.alibaba</groupId>
-		<artifactId>opensesame</artifactId>
-		<version>2.0</version>
-	</parent>-->
-    <groupId>com.alibaba</groupId>
+	<!--<parent> <groupId>com.alibaba</groupId> <artifactId>opensesame</artifactId>
+		<version>2.0</version> </parent> -->
+	<groupId>com.alibaba</groupId>
 	<artifactId>dubbo-parent</artifactId>
-	<version>2.5.4-SNAPSHOT</version>
+	<version>2.8.4</version>
 	<packaging>pom</packaging>
 	<name>${project.artifactId}</name>
 	<description>The parent project of dubbo</description>
@@ -52,10 +49,11 @@
 		<module>dubbo-monitor</module>
 		<module>dubbo-config</module>
 		<module>dubbo</module>
-                <module>dubbo-simple</module>
-                <module>dubbo-admin</module>
-                <module>dubbo-demo</module>
-        <module>hessian-lite</module>
+		<module>dubbo-simple</module>
+		<module>dubbo-admin</module>
+		<module>dubbo-demo</module>
+		<module>hessian-lite</module>
+        <!--<module>dubbo-tool/dubbo-demo-lite-archetype</module>-->
 	</modules>
 	<profiles>
 		<profile>
@@ -86,27 +84,27 @@
 	</profiles>
 	<properties>
 		<!-- Common libs -->
-		<spring_version>2.5.6.SEC03</spring_version>
+		<spring.bom.version>3.2.9.RELEASE</spring.bom.version>
 		<javassist_version>3.15.0-GA</javassist_version>
-		<netty_version>3.2.5.Final</netty_version>
+		<netty_version>3.7.0.Final</netty_version>
 		<mina_version>1.1.7</mina_version>
 		<grizzly_version>2.1.4</grizzly_version>
-		<httpclient_version>4.1.2</httpclient_version>
+		<httpclient_version>4.2.1</httpclient_version>
 		<hessian_lite_version>3.2.1-fixed-2</hessian_lite_version>
 		<xstream_version>1.4.1</xstream_version>
 		<fastjson_version>1.1.39</fastjson_version>
 		<bsf_version>3.1</bsf_version>
 		<sorcerer_version>0.8</sorcerer_version>
-		<zookeeper_version>3.3.3</zookeeper_version>
+		<zookeeper_version>3.4.6</zookeeper_version>
 		<zkclient_version>0.1</zkclient_version>
-		<curator_version>1.1.16</curator_version>
+		<curator_version>2.5.0</curator_version>
 		<jedis_version>2.1.0</jedis_version>
 		<xmemcached_version>1.3.6</xmemcached_version>
 		<cxf_version>2.6.1</cxf_version>
 		<thrift_version>0.8.0</thrift_version>
 		<jfreechart_version>1.0.13</jfreechart_version>
 		<hessian_version>4.0.7</hessian_version>
-		<servlet_version>2.5</servlet_version>
+		<servlet_version>3.1.0</servlet_version>
 		<jetty_version>6.1.26</jetty_version>
 		<validation_version>1.0.0.GA</validation_version>
 		<hibernate_validator_version>4.2.0.Final</hibernate_validator_version>
@@ -115,6 +113,9 @@
 		<guice_version>3.0</guice_version>
 		<cglib_version>2.2</cglib_version>
 		<webx_version>3.0.8</webx_version>
+        <jackson_version>2.3.3</jackson_version>
+        <commons_pool_version>1.6</commons_pool_version>
+        <tomcat_embed_version>8.0.11</tomcat_embed_version>
 		<!-- Log libs -->
 		<slf4j_version>1.6.2</slf4j_version>
 		<jcl_version>1.1</jcl_version>
@@ -125,34 +126,47 @@
 		<easymock_version>3.0</easymock_version>
 		<jmockit_version>0.999.8</jmockit_version>
 		<!-- Build args -->
-		<!--<argline>-server -Xms64m -Xmx64m -XX:PermSize=64m -XX:MaxPermSize=64m</argline>-->
+		<!--<argline>-server -Xms64m -Xmx64m -XX:PermSize=64m -XX:MaxPermSize=64m</argline> -->
 		<skip_maven_deploy>false</skip_maven_deploy>
 		<updateReleaseInfo>true</updateReleaseInfo>
 		<project.build.sourceEncoding>${file_encoding}</project.build.sourceEncoding>
 
-        <!-- generate idea copyright -->
-        <copyright>Copyright 1999-2012 Alibaba Group.&#10; &#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10; &#10;     http://www.apache.org/licenses/LICENSE-2.0&#10; &#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License.</copyright>
-        <profile.name>oss</profile.name>
+		<!-- generate idea copyright -->
+		<copyright>Copyright 1999-2012 Alibaba Group.&#10; &#10;Licensed under
+			the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you
+			may not use this file except in compliance with the License.&#10;You
+			may obtain a copy of the License at&#10; &#10;
+			http://www.apache.org/licenses/LICENSE-2.0&#10; &#10;Unless required
+			by applicable law or agreed to in writing, software&#10;distributed
+			under the License is distributed on an &quot;AS IS&quot;
+			BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
+			express or implied.&#10;See the License for the specific language
+			governing permissions and&#10;limitations under the License.</copyright>
+		<profile.name>oss</profile.name>
 
-        <!-- for maven compiler plugin -->
-        <maven_compiler_plugin_version>2.3.2</maven_compiler_plugin_version>
-        <java_source_version>1.5</java_source_version>
-        <java_target_version>1.5</java_target_version>
-        <file_encoding>UTF-8</file_encoding>
+		<!-- for maven compiler plugin -->
+		<maven_compiler_plugin_version>2.3.2</maven_compiler_plugin_version>
+		<java_source_version>1.6</java_source_version>
+		<java_target_version>1.6</java_target_version>
+		<file_encoding>UTF-8</file_encoding>
 
-        <maven_source_plugin_version>2.1.1</maven_source_plugin_version>
-        <maven_jar_plugin_version>2.3.2</maven_jar_plugin_version>
-        <maven_war_plugin_version>2.1.1</maven_war_plugin_version>
-        <maven_install_plugin_version>2.3.1</maven_install_plugin_version>
-        <maven_deploy_plugin_version>2.7</maven_deploy_plugin_version>
+		<maven_source_plugin_version>2.1.1</maven_source_plugin_version>
+		<maven_jar_plugin_version>2.3.2</maven_jar_plugin_version>
+		<maven_war_plugin_version>2.1.1</maven_war_plugin_version>
+		<maven_install_plugin_version>2.3.1</maven_install_plugin_version>
+		<maven_deploy_plugin_version>2.7</maven_deploy_plugin_version>
+
+        <maven-surefire-plugin_version>2.17</maven-surefire-plugin_version>
 	</properties>
 	<dependencyManagement>
 		<dependencies>
 			<!-- Common libs -->
 			<dependency>
 				<groupId>org.springframework</groupId>
-				<artifactId>spring</artifactId>
-				<version>${spring_version}</version>
+				<artifactId>spring-framework-bom</artifactId>
+				<version>${spring.bom.version}</version>
+				<type>pom</type>
+				<scope>import</scope>
 			</dependency>
 			<dependency>
 				<groupId>org.javassist</groupId>
@@ -160,7 +174,7 @@
 				<version>${javassist_version}</version>
 			</dependency>
 			<dependency>
-				<groupId>org.jboss.netty</groupId>
+				<groupId>io.netty</groupId>
 				<artifactId>netty</artifactId>
 				<version>${netty_version}</version>
 			</dependency>
@@ -215,7 +229,7 @@
 				<version>${zkclient_version}</version>
 			</dependency>
 			<dependency>
-				<groupId>com.netflix.curator</groupId>
+				<groupId>org.apache.curator</groupId>
 				<artifactId>curator-framework</artifactId>
 				<version>${curator_version}</version>
 			</dependency>
@@ -256,7 +270,7 @@
 			</dependency>
 			<dependency>
 				<groupId>javax.servlet</groupId>
-				<artifactId>servlet-api</artifactId>
+				<artifactId>javax.servlet-api</artifactId>
 				<version>${servlet_version}</version>
 			</dependency>
 			<dependency>
@@ -294,6 +308,16 @@
 				<artifactId>citrus-webx-all</artifactId>
 				<version>${webx_version}</version>
 			</dependency>
+             <dependency>
+                 <groupId>com.fasterxml.jackson.core</groupId>
+                 <artifactId>jackson-core</artifactId>
+                 <version>${jackson_version}</version>
+             </dependency>
+             <dependency>
+                  <groupId>com.fasterxml.jackson.core</groupId>
+                  <artifactId>jackson-databind</artifactId>
+                  <version>${jackson_version}</version>
+              </dependency>
 			<!-- Log libs -->
 			<dependency>
 				<groupId>org.slf4j</groupId>
@@ -350,6 +374,73 @@
 				<artifactId>cglib-nodep</artifactId>
 				<version>${cglib_version}</version>
 			</dependency>
+			<dependency>
+				<groupId>commons-pool</groupId>
+				<artifactId>commons-pool</artifactId>
+				<version>${commons_pool_version}</version>
+			</dependency>
+            <dependency>
+                <groupId>org.apache.tomcat.embed</groupId>
+                <artifactId>tomcat-embed-core</artifactId>
+                <version>${tomcat_embed_version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.tomcat.embed</groupId>
+                <artifactId>tomcat-embed-logging-juli</artifactId>
+                <version>${tomcat_embed_version}</version>
+            </dependency>
+
+            <!-- TODO move versions into properties -->
+            <dependency>
+                <groupId>javax.ws.rs</groupId>
+                <artifactId>javax.ws.rs-api</artifactId>
+                <version>2.0</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.resteasy</groupId>
+                <artifactId>resteasy-jaxrs</artifactId>
+                <version>3.0.7.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.resteasy</groupId>
+                <artifactId>resteasy-client</artifactId>
+                <version>3.0.7.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.resteasy</groupId>
+                <artifactId>resteasy-netty</artifactId>
+                <version>3.0.7.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.resteasy</groupId>
+                <artifactId>resteasy-jdk-http</artifactId>
+                <version>3.0.7.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.resteasy</groupId>
+                <artifactId>resteasy-jackson-provider</artifactId>
+                <version>3.0.7.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>org.jboss.resteasy</groupId>
+                <artifactId>resteasy-jaxb-provider</artifactId>
+                <version>3.0.7.Final</version>
+            </dependency>
+            <dependency>
+                <groupId>com.esotericsoftware.kryo</groupId>
+                <artifactId>kryo</artifactId>
+                <version>2.24.0</version>
+            </dependency>
+            <dependency>
+                <groupId>de.javakaffee</groupId>
+                <artifactId>kryo-serializers</artifactId>
+                <version>0.26</version>
+            </dependency>
+            <dependency>
+                <groupId>de.ruedigermoeller</groupId>
+                <artifactId>fst</artifactId>
+                <version>1.55</version>
+            </dependency>
 		</dependencies>
 	</dependencyManagement>
 	<dependencies>
@@ -365,7 +456,7 @@
 			<groupId>org.easymock</groupId>
 			<artifactId>easymockclassextension</artifactId>
 		</dependency>
-			<dependency>
+		<dependency>
 			<groupId>com.googlecode.jmockit</groupId>
 			<artifactId>jmockit</artifactId>
 		</dependency>
@@ -386,9 +477,22 @@
 					</archive>
 				</configuration>
 			</plugin>
+			<plugin>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<phase>package</phase>
+						<goals>
+							<goal>jar-no-fork</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
 			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-surefire-plugin</artifactId>
+                <version>${maven-surefire-plugin_version}</version>
 				<configuration>
 					<useSystemClassLoader>true</useSystemClassLoader>
 					<forkMode>once</forkMode>
@@ -465,40 +569,76 @@
 			</plugin>
 		</plugins>
 
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>${maven_jar_plugin_version}</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-war-plugin</artifactId>
-                    <version>${maven_war_plugin_version}</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-install-plugin</artifactId>
-                    <version>${maven_install_plugin_version}</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>${maven_deploy_plugin_version}</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>${maven_compiler_plugin_version}</version>
-                    <configuration>
-                        <source>${java_source_version}</source>
-                        <target>${java_target_version}</target>
-                        <encoding>${file_encoding}</encoding>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-jar-plugin</artifactId>
+					<version>${maven_jar_plugin_version}</version>
+				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-war-plugin</artifactId>
+					<version>${maven_war_plugin_version}</version>
+				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-install-plugin</artifactId>
+					<version>${maven_install_plugin_version}</version>
+				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-deploy-plugin</artifactId>
+					<version>${maven_deploy_plugin_version}</version>
+				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-compiler-plugin</artifactId>
+					<version>${maven_compiler_plugin_version}</version>
+					<configuration>
+                        <fork>true</fork>
+						<source>${java_source_version}</source>
+						<target>${java_target_version}</target>
+						<encoding>${file_encoding}</encoding>
+                        <compilerArgs>
+                            <arg>-XX:MaxPermSize=512M</arg>
+                        </compilerArgs>
+					</configuration>
+				</plugin>
+				<!--This plugin's configuration is used to store Eclipse m2e settings
+					only. It has no influence on the Maven build itself. -->
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>
+											org.apache.maven.plugins
+										</groupId>
+										<artifactId>
+											maven-dependency-plugin
+										</artifactId>
+										<versionRange>
+											[2.1,)
+										</versionRange>
+										<goals>
+											<goal>unpack</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore></ignore>
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
 
 	</build>
 


 

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


With regards,
Apache Git Services

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