- 浏览: 147294 次
- 性别:
- 来自: 北京
文章分类
最新评论
Dubbo入门实例--转载
原文地址:http://blog.csdn.net/ruishenh/article/details/23180707?utm_source=tuicool
1.概述
Dubbo是一个分布式服务框架,致力于提供高性能和透明化的RPC远程服务调用方案,以及SOA服务治理方案
主要核心部件
Remoting: 网络通信框架,实现了sync-over-async 和 request-response 消息机制.
RPC: 一个远程过程调用的抽象,支持负载均衡、容灾和集群功能
Registry: 服务目录框架用于服务的注册和服务事件发布和订阅。
Dubbo采用全Spring配置方式,透明化接入应用,对应用没有任何API侵入,只需用Spring加载Dubbo的配置即可,Dubbo基于Spring的Schema扩展进行加载。
2.简单实例
首先maven项目增加dubbo的jar依赖,因为要用到zookeeper注册中心,也要依赖但是要去掉自带的log4j不然会默认的版本依赖jms-1.1.jarjmxtools-1.2.1.jarjmxri-1.2.1.jar等3个包,下载挺麻烦,当然如果个人已经在自己的仓库中有了就无所谓了。
- <!--dubbo-->
- <dependency>
- <groupId>com.alibaba</groupId>
- <artifactId>dubbo</artifactId>
- <version>2.0.13</version>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>3.3.6</version>
- <exclusions>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.16</version>
- </dependency>
Spring的依赖自己添加就好了
因为要增加zookeeper的注册管理,所以如果有可用的zookeeper就用可用的zookeeper,没有可以按照如下的安装去本地安装一个。
http://blog.csdn.net/ruishenh/article/details/23180355
项目结构图
/gomeTest/src/main/resources/spring/dubbo-provider.xml
- <?xmlversion="1.0"encoding="UTF-8"?>
- <beansxmlnsbeansxmlns="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.xsd
- http://code.alibabatech.com/schema/dubbo
- http://code.alibabatech.com/schema/dubbo/dubbo.xsd
- ">
- <dubbo:applicationnamedubbo:applicationname="hello-world-app"/>
- <!--zookeeper注册中心-->
- <dubbo:registryprotocoldubbo:registryprotocol="zookeeper"address="10.57.41.19:2181"/>
- <!--使用multicast广播注册中心暴露服务地址-->
- <!--<dubbo:registryaddress="multicast://10.57.41.19:1234"/>-->
- <dubbo:protocolnamedubbo:protocolname="dubbo"port="20880"/>
- <dubbo:serviceinterfacedubbo:serviceinterface="com.ruishenh.dubbo.example.DemoService"
- ref="demoService"/><!--和本地bean一样实现服务-->
- <beanidbeanid="demoService"class="com.ruishenh.dubbo.example.DemoServiceImpl"/>
- </beans>
/gomeTest/src/main/resources/spring/dubbo-consumer.xml
- <?xmlversion="1.0"encoding="UTF-8"?>
- <beansxmlnsbeansxmlns="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.xsd
- http://code.alibabatech.com/schema/dubbo
- http://code.alibabatech.com/schema/dubbo/dubbo.xsd
- ">
- <!--消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样-->
- <dubbo:applicationnamedubbo:applicationname="consumer-of-helloworld-app"/>
- <!--zookeeper注册中心-->
- <dubbo:registryprotocol="zookeeper"address="10.57.41.19:2181"/>
- <!--使用multicast广播注册中心暴露的服务地址-->
- <!--<dubbo:registryaddress="multicast://10.57.41.19:1234"/>-->
- <!--生成远程服务代理,可以和本地bean一样使用demoService-->
- <dubbo:referenceiddubbo:referenceid="demoService"interface="com.ruishenh.dubbo.example.DemoService"/>
- </beans>
/gomeTest/src/main/java/com/ruishenh/dubbo/example/DemoService.java
- packagecom.ruishenh.dubbo.example;
- publicinterfaceDemoService{
- publicvoidsayHello();
- publicStringreturnHello();
- publicMsgInforeturnMsgInfo(MsgInfoinfo);
- }
/gomeTest/src/main/java/com/ruishenh/dubbo/example/DemoServiceImpl.java
- packagecom.ruishenh.dubbo.example;
- publicclassDemoServiceImplimplementsDemoService{
- publicvoidsayHello(){
- System.out.println("helloworld!");
- }
- publicStringreturnHello(){
- return"helloworld!";
- }
- publicMsgInforeturnMsgInfo(MsgInfoinfo){
- info.getMsgs().add("处理完毕");
- returninfo;
- }
- }
/gomeTest/src/main/java/com/ruishenh/dubbo/example/LuncherProvider.java
- packagecom.ruishenh.dubbo.example;
- importorg.springframework.context.ApplicationContext;
- importorg.springframework.context.support.ClassPathXmlApplicationContext;
- publicclassLuncherProvider{
- publicstaticvoidmain(String[]args)throwsInterruptedException{
- LuncherProviderluncher=newLuncherProvider();
- luncher.start();
- Thread.sleep(1000*60*10);
- }
- voidstart(){
- StringconfigLocation="spring/dubbo-provider.xml";
- ApplicationContextcontext=newClassPathXmlApplicationContext(configLocation);
- String[]names=context.getBeanDefinitionNames();
- System.out.print("Beans:");
- for(Stringstring:names)
- System.out.print(string+",");
- System.out.println();
- }
- }
/gomeTest/src/main/java/com/ruishenh/dubbo/example/LuncherConsumer.java
- packagecom.ruishenh.dubbo.example;
- importjava.util.ArrayList;
- importjava.util.List;
- importorg.springframework.context.ApplicationContext;
- importorg.springframework.context.support.ClassPathXmlApplicationContext;
- publicclassLuncherConsumer{
- publicstaticvoidmain(String[]args)throwsInterruptedException{
- LuncherConsumerluncher=newLuncherConsumer();
- luncher.start();
- }
- voidstart(){
- StringconfigLocation="spring/dubbo-consumer.xml";
- ApplicationContextcontext=newClassPathXmlApplicationContext(configLocation);
- DemoServiceds=(DemoService)context.getBean("demoService");
- String[]names=context.getBeanDefinitionNames();
- System.out.print("Beans:");
- for(Stringstring:names){
- System.out.print(string);
- System.out.print(",");
- }
- System.out.println();
- MsgInfoinfo=newMsgInfo();
- info.setId(1);
- info.setName("ruisheh");
- List<String>msgs=newArrayList<String>();
- msgs.add("I");
- msgs.add("am");
- msgs.add("test");
- info.setMsgs(msgs);
- System.out.println(ds.returnMsgInfo(info).getMsgs());
- }
- }
/gomeTest/src/main/java/com/ruishenh/dubbo/example/MsgInfo.java
- packagecom.ruishenh.dubbo.example;
- importjava.io.Serializable;
- importjava.util.List;
- publicclassMsgInfoimplementsSerializable{
- privatestaticfinallongserialVersionUID=-2814022769568306965L;
- intid;
- Stringname;
- List<String>msgs;
- publicintgetId(){
- returnid;
- }
- publicvoidsetId(intid){
- this.id=id;
- }
- publicStringgetName(){
- returnname;
- }
- publicvoidsetName(Stringname){
- this.name=name;
- }
- publicList<String>getMsgs(){
- returnmsgs;
- }
- publicvoidsetMsgs(List<String>msgs){
- this.msgs=msgs;
- }
- }
//启动provider
- Refreshingorg.springframework.context.support.ClassPathXmlApplicationContext@42b988a6:startup date [Tue Apr 08 13:43:59 CST 2014]; root of context hierarchy
- Loading XML bean definitions from classpath resource [spring/dubbo-provider.xml]
- using logger:com.alibaba.dubbo.common.logger.support.Log4jLoggerFactory
- Pre-instantiating singletons inorg.springframework.beans.factory.support.DefaultListableBeanFactory@7c2e1f1f:defining beans[hello-world-app,com.alibaba.dubbo.config.RegistryConfig,dubbo,com.ruishenh.dubbo.example.DemoService,demoService];root of factory hierarchy
-[DUBBO] No dubbo.properties found on the class path., dubbo version:2.0.13, current host: 127.0.0.1
-[DUBBO] Export dubbo service com.ruishenh.dubbo.example.DemoService tourldubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=hello-world-app&dubbo=2.0.13&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=,dubbo version: 2.0.13, current host: 127.0.0.1
-[DUBBO] Register dubbo service com.ruishenh.dubbo.example.DemoServiceurl dubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=hello-world-app&dubbo=2.0.13&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=to registry registry://10.57.41.19:2181/com.alibaba.dubbo.registry.RegistryService?application=hello-world-app®istry=zookeeper,dubbo version: 2.0.13, current host: 127.0.0.1
-[DUBBO] Start NettyServer bind /0.0.0.0:20880, export/10.57.41.19:20880, dubbo version: 2.0.13, current host: 127.0.0.1
- Client environment:zookeeper.version=3.3.6-1366786,built on 07/29/2012 06:22 GMT
- Clientenvironment:host.name=houchangren.ds.gome.com.cn
- Client environment:java.version=1.6.0_26
- Client environment:java.vendor=SunMicrosystems Inc.
- Clientenvironment:java.home=D:\application\Java\jdk1.6.0_26\jre
- Clientenvironment:java.class.path=D:\workspace\20140326\gomeTest\target\classes;D:\jar\jars\jai_imageio-1.1-alpha.jar;D:\jar\jars\rocketmq\rocketmq-broker-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-client-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-common-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-example-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-namesrv-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-remoting-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-research-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-store-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-tools-3.0.8.jar;D:\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;D:\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar;D:\repository\commons-codec\commons-codec\1.2\commons-codec-1.2.jar;D:\repository\org\apache\httpcomponents\httpclient\4.2.3\httpclient-4.2.3.jar;D:\repository\org\apache\httpcomponents\httpcore\4.2.3\httpcore-4.2.3.jar;D:\repository\org\apache\httpcomponents\httpmime\4.2.3\httpmime-4.2.3.jar;D:\repository\ch\qos\logback\logback-classic\1.1.1\logback-classic-1.1.1.jar;D:\repository\org\slf4j\slf4j-api\1.7.6\slf4j-api-1.7.6.jar;D:\repository\ch\qos\logback\logback-core\1.1.1\logback-core-1.1.1.jar;D:\repository\org\swinglabs\swingx\1.6.1\swingx-1.6.1.jar;D:\repository\com\jhlabs\filters\2.0.235\filters-2.0.235.jar;D:\repository\org\swinglabs\swing-worker\1.1\swing-worker-1.1.jar;D:\repository\redis\clients\jedis\2.4.2\jedis-2.4.2.jar;D:\repository\org\apache\commons\commons-pool2\2.0\commons-pool2-2.0.jar;D:\repository\org\springframework\spring-webmvc\3.1.0.RELEASE\spring-webmvc-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-asm\3.1.0.RELEASE\spring-asm-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-context-support\3.1.0.RELEASE\spring-context-support-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-web\3.1.0.RELEASE\spring-web-3.1.0.RELEASE.jar;D:\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\repository\org\springframework\spring-test\3.1.0.RELEASE\spring-test-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-expression\3.1.0.RELEASE\spring-expression-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-tx\3.1.0.RELEASE\spring-tx-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-aop\3.1.0.RELEASE\spring-aop-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-beans\3.1.0.RELEASE\spring-beans-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-core\3.1.0.RELEASE\spring-core-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-context\3.1.0.RELEASE\spring-context-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-jdbc\3.1.0.RELEASE\spring-jdbc-3.1.0.RELEASE.jar;D:\repository\org\quartz-scheduler\quartz\1.7.2\quartz-1.7.2.jar;D:\repository\com\alibaba\dubbo\2.0.13\dubbo-2.0.13.jar;D:\repository\org\springframework\spring\2.5.6.SEC03\spring-2.5.6.SEC03.jar;D:\repository\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;D:\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;D:\repository\org\apache\zookeeper\zookeeper\3.3.6\zookeeper-3.3.6.jar;D:\repository\jline\jline\0.9.94\jline-0.9.94.jar;D:\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar;D:\repository\org\codehaus\jackson\jackson-core-asl\1.8.4\jackson-core-asl-1.8.4.jar;D:\repository\org\codehaus\jackson\jackson-mapper-asl\1.8.4\jackson-mapper-asl-1.8.4.jar;D:\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;D:\repository\javax\servlet\jsp-api\2.0\jsp-api-2.0.jar
- Client environment:java.library.path=D:\application\Java\jdk1.6.0_26\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramFiles (x86)\NVIDIACorporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\application\Java\jdk1.6.0_26\bin;D:\application\apache-maven-3.1.0\bin;D:\application\TortoiseSVN\bin;D:\application\SlikSvn\bin;D:\application\Java\jdk1.6.0_26\lib;C:\ProgramFiles (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\application\Java\jdk1.6.0_26\bin;D:\application\apache-maven-3.1.0\bin;D:\application\TortoiseSVN\bin;D:\application\SlikSvn\bin;D:\application\Java\jdk1.6.0_26\lib;;D:\application\IDMComputerSolutions\UltraEdit\;D:\application\Java\jdk1.6.0_26\bin;D:\application\Java\jdk1.6.0_26\jre\bin;.
- Clientenvironment:java.io.tmpdir=C:\Users\HOUCHA~1\AppData\Local\Temp\
- Clientenvironment:java.compiler=<NA>
- Client environment:os.name=Windows 7
- Client environment:os.arch=amd64
- Client environment:os.version=6.1
- Client environment:user.name=houchangren
- Clientenvironment:user.home=C:\Users\houchangren
- Clientenvironment:user.dir=D:\workspace\20140326\gomeTest
- Initiating client connection,connectString=10.57.41.19:2181 sessionTimeout=60000watcher=com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry$1@a3468f4
- Opening socket connection to server/10.57.41.19:2181
-[DUBBO] Register: dubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=hello-world-app&dubbo=2.0.13&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=,dubbo version: 2.0.13, current host: 127.0.0.1
- Socket connection established tohouchangren.ds.gome.com.cn/10.57.41.19:2181, initiating session
- Session establishment complete on serverhouchangren.ds.gome.com.cn/10.57.41.19:2181, sessionid = 0x1453fd17c750004,negotiated timeout = 40000
-[DUBBO] Recover register services[dubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=hello-world-app&dubbo=2.0.13&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=],dubbo version: 2.0.13, current host: 127.0.0.1
-[DUBBO] Register:dubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=hello-world-app&dubbo=2.0.13&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=,dubbo version: 2.0.13, current host: 127.0.0.1
Beans:hello-world-app,com.alibaba.dubbo.config.RegistryConfig,dubbo,com.ruishenh.dubbo.example.DemoService,demoService,
//这两句是在有consumer执行后的日志
-[DUBBO] All clients has discontected from /10.57.41.19:20880. You cangraceful shutdown now., dubbo version: 2.0.13, current host: 127.0.0.1
-[DUBBO] disconected from/10.57.41.19:58330,url:dubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=hello-world-app&channel.readonly.sent=true&codec=dubbo&codec.downstream=dubbo&dubbo=2.0.13&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=,dubbo version: 2.0.13, current host: 127.0.0.1
//启动Consumer
- Refreshingorg.springframework.context.support.ClassPathXmlApplicationContext@42b988a6:startup date [Tue Apr 08 13:45:09 CST 2014]; root of context hierarchy
- Loading XML bean definitions from classpath resource [spring/dubbo-consumer.xml]
- using logger:com.alibaba.dubbo.common.logger.support.Log4jLoggerFactory
- Pre-instantiating singletons inorg.springframework.beans.factory.support.DefaultListableBeanFactory@250d593e:defining beans[consumer-of-helloworld-app,com.alibaba.dubbo.config.RegistryConfig,demoService];root of factory hierarchy
-[DUBBO] No dubbo.properties found on the class path., dubbo version:2.0.13, current host: 127.0.0.1
- Client environment:zookeeper.version=3.3.6-1366786,built on 07/29/2012 06:22 GMT
- Clientenvironment:host.name=houchangren.ds.gome.com.cn
- Client environment:java.version=1.6.0_26
- Client environment:java.vendor=SunMicrosystems Inc.
- Client environment:java.home=D:\application\Java\jdk1.6.0_26\jre
- Clientenvironment:java.class.path=D:\workspace\20140326\gomeTest\target\classes;D:\jar\jars\jai_imageio-1.1-alpha.jar;D:\jar\jars\rocketmq\rocketmq-broker-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-client-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-common-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-example-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-namesrv-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-remoting-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-research-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-store-3.0.8.jar;D:\jar\jars\rocketmq\rocketmq-tools-3.0.8.jar;D:\repository\commons-httpclient\commons-httpclient\3.1\commons-httpclient-3.1.jar;D:\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar;D:\repository\commons-codec\commons-codec\1.2\commons-codec-1.2.jar;D:\repository\org\apache\httpcomponents\httpclient\4.2.3\httpclient-4.2.3.jar;D:\repository\org\apache\httpcomponents\httpcore\4.2.3\httpcore-4.2.3.jar;D:\repository\org\apache\httpcomponents\httpmime\4.2.3\httpmime-4.2.3.jar;D:\repository\ch\qos\logback\logback-classic\1.1.1\logback-classic-1.1.1.jar;D:\repository\org\slf4j\slf4j-api\1.7.6\slf4j-api-1.7.6.jar;D:\repository\ch\qos\logback\logback-core\1.1.1\logback-core-1.1.1.jar;D:\repository\org\swinglabs\swingx\1.6.1\swingx-1.6.1.jar;D:\repository\com\jhlabs\filters\2.0.235\filters-2.0.235.jar;D:\repository\org\swinglabs\swing-worker\1.1\swing-worker-1.1.jar;D:\repository\redis\clients\jedis\2.4.2\jedis-2.4.2.jar;D:\repository\org\apache\commons\commons-pool2\2.0\commons-pool2-2.0.jar;D:\repository\org\springframework\spring-webmvc\3.1.0.RELEASE\spring-webmvc-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-asm\3.1.0.RELEASE\spring-asm-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-context-support\3.1.0.RELEASE\spring-context-support-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-web\3.1.0.RELEASE\spring-web-3.1.0.RELEASE.jar;D:\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;D:\repository\org\springframework\spring-test\3.1.0.RELEASE\spring-test-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-expression\3.1.0.RELEASE\spring-expression-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-tx\3.1.0.RELEASE\spring-tx-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-aop\3.1.0.RELEASE\spring-aop-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-beans\3.1.0.RELEASE\spring-beans-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-core\3.1.0.RELEASE\spring-core-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-context\3.1.0.RELEASE\spring-context-3.1.0.RELEASE.jar;D:\repository\org\springframework\spring-jdbc\3.1.0.RELEASE\spring-jdbc-3.1.0.RELEASE.jar;D:\repository\org\quartz-scheduler\quartz\1.7.2\quartz-1.7.2.jar;D:\repository\com\alibaba\dubbo\2.0.13\dubbo-2.0.13.jar;D:\repository\org\springframework\spring\2.5.6.SEC03\spring-2.5.6.SEC03.jar;D:\repository\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;D:\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;D:\repository\org\apache\zookeeper\zookeeper\3.3.6\zookeeper-3.3.6.jar;D:\repository\jline\jline\0.9.94\jline-0.9.94.jar;D:\repository\log4j\log4j\1.2.16\log4j-1.2.16.jar;D:\repository\org\codehaus\jackson\jackson-core-asl\1.8.4\jackson-core-asl-1.8.4.jar;D:\repository\org\codehaus\jackson\jackson-mapper-asl\1.8.4\jackson-mapper-asl-1.8.4.jar;D:\repository\javax\servlet\servlet-api\2.5\servlet-api-2.5.jar;D:\repository\javax\servlet\jsp-api\2.0\jsp-api-2.0.jar
- Clientenvironment:java.library.path=D:\application\Java\jdk1.6.0_26\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramFiles (x86)\NVIDIACorporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\application\Java\jdk1.6.0_26\bin;D:\application\apache-maven-3.1.0\bin;D:\application\TortoiseSVN\bin;D:\application\SlikSvn\bin;D:\application\Java\jdk1.6.0_26\lib;C:\ProgramFiles (x86)\NVIDIACorporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\application\Java\jdk1.6.0_26\bin;D:\application\apache-maven-3.1.0\bin;D:\application\TortoiseSVN\bin;D:\application\SlikSvn\bin;D:\application\Java\jdk1.6.0_26\lib;;D:\application\IDMComputer Solutions\UltraEdit\;D:\application\Java\jdk1.6.0_26\bin;D:\application\Java\jdk1.6.0_26\jre\bin;.
- Clientenvironment:java.io.tmpdir=C:\Users\HOUCHA~1\AppData\Local\Temp\
- Clientenvironment:java.compiler=<NA>
- Client environment:os.name=Windows 7
- Client environment:os.arch=amd64
- Client environment:os.version=6.1
- Client environment:user.name=houchangren
- Clientenvironment:user.home=C:\Users\houchangren
- Clientenvironment:user.dir=D:\workspace\20140326\gomeTest
- Initiating client connection,connectString=10.57.41.19:2181 sessionTimeout=60000watcher=com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry$1@219ba640
- Opening socket connection to server/10.57.41.19:2181
- Socket connection established to houchangren.ds.gome.com.cn/10.57.41.19:2181,initiating session
-[DUBBO] Subscribe:subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello,dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Register:subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello,dubbo version: 2.0.13, current host: 10.57.41.19
- Session establishment complete on serverhouchangren.ds.gome.com.cn/10.57.41.19:2181, sessionid = 0x1453fd17c750005,negotiated timeout = 40000
-[DUBBO] Recover register services[subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello],dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Register:subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello,dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Start NettyClient houchangren/10.57.41.19 connect to the server/10.57.41.19:20880, dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Recover subscribe services{subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello=[com.alibaba.dubbo.registry.support.RegistryDirectory@57922f46]},dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Subscribe:subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello,dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Register:subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello,dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Refer dubbo service com.ruishenh.dubbo.example.DemoService fromurlzookeeper://10.57.41.19:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=,dubbo version: 2.0.13, current host: 10.57.41.19
Beans:consumer-of-helloworld-app,com.alibaba.dubbo.config.RegistryConfig,demoService,
[I, am, test, 处理完毕]
-[DUBBO] Run shutdown hook now., dubbo version: 2.0.13, current host:10.57.41.19
-[DUBBO] Close all registries[zookeeper://10.57.41.19:2181/com.alibaba.dubbo.registry.RegistryService?application=consumer-of-helloworld-app&refer=application%3Dconsumer-of-helloworld-app%26dubbo%3D2.0.13%26id%3DdemoService%26interface%3Dcom.ruishenh.dubbo.example.DemoService%26methods%3DreturnMsgInfo%2CreturnHello%2CsayHello],dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Destroy registry:zookeeper://10.57.41.19:2181/com.alibaba.dubbo.registry.RegistryService?application=consumer-of-helloworld-app&refer=application%3Dconsumer-of-helloworld-app%26dubbo%3D2.0.13%26id%3DdemoService%26interface%3Dcom.ruishenh.dubbo.example.DemoService%26methods%3DreturnMsgInfo%2CreturnHello%2CsayHello,dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Unregister:subscribe://10.57.41.19/com.ruishenh.dubbo.example.DemoService?application=consumer-of-helloworld-app&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello,dubbo version: 2.0.13, current host: 10.57.41.19
- Session: 0x1453fd17c750005 closed
- EventThread shut down
-[DUBBO] Destroy reference:dubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=consumer-of-helloworld-app&check=false&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=,dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Close netty channel [id: 0x3fdb484d, /10.57.41.19:58314 =>/10.57.41.19:20880], dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] disconected from/10.57.41.19:20880,url:dubbo://10.57.41.19:20880/com.ruishenh.dubbo.example.DemoService?anyhost=true&application=consumer-of-helloworld-app&check=false&codec=dubbo&dubbo=2.0.13&id=demoService&interface=com.ruishenh.dubbo.example.DemoService&methods=returnMsgInfo,returnHello,sayHello&prompt=dubbo&revision=,dubbo version: 2.0.13, current host: 10.57.41.19
-[DUBBO] Close dubbo connect: 10.57.41.19:0-->10.57.41.19:20880, dubboversion: 2.0.13, current host: 10.57.41.19
-[DUBBO] Close dubbo connect: 10.57.41.19:0-->10.57.41.19:20880, dubboversion: 2.0.13, current host: 10.57.41.19
相关推荐
问题描述: 停车场内只有一个可停放n辆汽车的狭长通道,且只有一个大门可供汽车进出。汽车在停车场内按车辆到达时间的先后顺序,依次由北向南排列(大门在最南端,最先到达的第一辆车停放在停车场的最北端),若车场内已停满n辆汽车,则后来的汽车只能在门外的便道上等候,一旦有车开走,则排在便道上的第一辆车即可开入; 当停车场内某辆车要离开时,在它之后开入的车辆必须先退出车场为它让路,待该辆车开出大门外,其它车辆再按原次序进入车场,每辆停放在车场的车在它离开停车场时必须按它停留的时间长短交纳费用。试为停车场编制按上述要求进行管理的模拟程序。 1.基本要求 (1)以栈模拟停车场,以队列模拟车场外的便道,按照从终端读入的输入数据序列进行模拟管理。 (2)每一组输入数据包括三个数据项:汽车“到达”或“离去”信息、汽车牌照号码及到达或离去的时刻,对每一组输入数据进行操作后的输出数据为:若是车辆到达,则输出汽车在停车场内或便道上的停车位置;若是车离去;则输出汽车在停车场内停留的时间和应交纳的费用(在便道上停留的时间不收费)。 (3)栈以顺序结构实现,队列以链表实现。 2.重点难点 重点:针对停车场问题的特点,利
精选毕设项目-人民好公仆小程序(生活+便民+政务)
精选毕设项目-相册;处理用户信息
精选毕设项目-喵喵小说
精选毕设项目-图片预览带后端
精选项目-爱靓女带后台
在科技与司法的交响曲中,智慧法院应运而生,成为新时代司法服务的新篇章。它不仅仅是一个概念,更是对法院传统工作模式的一次深刻变革。智慧法院通过移动信息化技术,为法院系统注入了强大的生命力,有效缓解了案多人少的矛盾,让司法服务更加高效、便捷。 立案、调解、审判,每一个阶段都融入了科技的智慧。在立案阶段,智慧法院利用区块链技术实现可信存证,确保了电子合同的合法性和安全性,让交易双方的身份真实性、交易安全性得到了有力见证。这不仅极大地缩短了立案时间,还为后续审判工作奠定了坚实的基础。在调解阶段,多元调解服务平台借助人工智能、自然语言处理等前沿技术,实现了矛盾纠纷的快速化解。无论是矛盾类型的多元化,还是化解主体的多元化,智慧法院都能提供一站式、全方位的服务,让纠纷解决更加高效、和谐。而在审判阶段,智能立案、智能送达、智能庭审、智能判决等一系列智能化手段的应用,更是让审判活动变得更加智能化、集约化。这不仅提高了审判效率,还确保了审判质量的稳步提升。 更为引人注目的是,智慧法院还构建了一套完善的执行体系。移动执行指挥云平台的建设,让执行工作变得更加精准、高效。执行指挥中心和信息管理中心的一体化应用,实现了信息的实时传输和交换,为执行工作提供了强有力的支撑。而执行指挥车的配备,更是让执行现场通讯信号得到了有力保障,应急通讯能力得到了显著提升。这一系列创新举措的实施,不仅让执行难问题得到了有效解决,还为构建诚信社会、保障金融法治化营商环境提供了有力支撑。智慧法院的出现,让司法服务更加贴近民心,让公平正义的阳光更加温暖人心。
西门子1200与3台台达DTK温控器通讯程序 功能:实现西门子1200 PLC对3台台达DTK温控器进行485通讯控制,在触摸屏上设定温度,读取温度 器件:西门子1200 1214DC DC DC.昆仑通态TPC7062Ti ,西门子KTP700 Basic PN,台达DTK 4848V12温控器。 说明:的是程序,带详细注释程序,西门子触摸屏程序,PLC设置和温控器设置,接线说明书。 #SIEMENS 西门子
机械设计电阻绕线焊线一体机sw18全套技术资料100%好用.zip
VB6编写的上位机源码,可实时显示曲线图,带有数据库,可以进行历史数据的保存 及 查看历史采集数据。
精选毕设项目-新浪读书
jQuery+Slick插件实现游戏人物轮播展示切换特效源码是一款通过背景图片的切换来显示不同的人物效果,轮播效果通过slick幻灯片插件来制作。效果非常棒,有需要的朋友可以直接下载使用,适应各大网站
精选毕设项目-地图查找附件
(蛐蛐voc数据)农作物病虫害识别目标检测数据集,VOC格式,蛐蛐数据集,纯手动标注,用来进行目标检测代码训练的数据。
MATLAB Simulink仿真模型 双馈风机并网频率控制仿真模型,利用下垂控制与惯性控制结合的综合惯性控制,实现电力系统的频率稳定,两台同步发电机组,具体参数可自行调节,频率波形比较可利用matlab工作区画出。
一、结题报告的类型及主要结构 结题报告是一种专门用于科研课题结题验收的实用性报告类文体,也叫研究报告。它是研究者在课题研究结束后对科研课题研究过程和研究成果进行客观、全面、实事求是的描述,是课题研究所有材料中最主要的材料,也是科研课题结题验收的主要依据。 一篇规范、合格的结题报告,需要回答好3个问题:一是“为什么要选择这项课题进行研究?”二是“这项课题是怎样进行研究的?”三是“课题研究取得哪些研究成果?” 基本结构大致包括以下部分: 第一个问题 “为什么要选择这项课题进行研究?” 1.课题提出的背景;2.课题研究的意义(包括理论意义和现实意义,这个部分也可以合并归入“课题提出的背景”部分);第二个问题“这项课题是怎样进行研究的?”3.文献综述;4.课题研究的理论依据;5.课题研究的目标;6.课题研究的主要内容;7.课题研究的对象;8.课题研究的方法;9. 课题研究的主要过程(研究的步骤); 除了第9部分外,从第1到第8部分在填报课题立项申报表、在制定课题研究方案、在开题报告中,都有要求,内容基本相同。到了撰写结题报告时,只须稍作适当修改就可以了。而第9部分,则需要通过对
内容概要:本文档重点讲述了网络安全应急响应的各项准备工作,涵盖了‘1+X’网络安全应急响应的职业技能等级证书概述、应急响应的基础知识、应急响应组织的建立、风险评估与改进、应急响应预案的制定以及详细的应急响应计划处置样例。文中详细介绍了各级职业技能的要求和任务,尤其关注如何未雨绸缪,制定完善的应急预案以应对潜在的网络安全风险;同时也探讨了如何在网络安全事件发生时,采取及时有效的应急处置措施。 适合人群:从事或有兴趣进入网络安全领域的从业人员,尤其是准备考取‘1+X’网络安全应急响应职业技能等级证书的相关人员。 使用场景及目标:帮助读者了解网络安全应急响应的基本概念及其在整个国家安全框架中的重要地位;指导读者学会如何建立健全高效的应急响应组织结构,如何进行全面的风险评估以及如何编制切实可行的应急预案;通过实例剖析,增强读者应对突发网络安全事件的能力。文档的目标在于提升读者在不同层面的专业技能,包括但不限于系统备份、日志分析、安全漏洞修复等方面的能力。 阅读建议:此文档结构清晰,内容详尽,非常适合有一定基础的技术从业者参考学习。建议读者逐章节深入了解,特别是关注自身岗位对应的技能细分类别。此外,结合实例深入理解和练习如何进行应急处置是非常有价值的,有助于提升自身的实战能力。
电动汽车动力系统匹配计算模型:输入整车参数及性能要求,一键生成驱动系统的扭矩功率峰值转速等参数。 2、整车动力经济性计算模型:包含NEDC WLTC CLTC工况,输入整车参数可生成工况电耗、百公里电耗、匀速工况续航、百公里电耗等信息。 实际项目中使用的计算仿真模型. 两个模型打包
chromedriver-linux64_122.0.6254.0
SRS构型七自由度冗余机械臂运动学建模全套matlab代码 代码主要功能: [1]. 基于臂角参数化方法求解机械臂在给定末端位姿和臂角下的关节角度; [2]. 求解机械臂在给定末端位姿下的有效臂角范围,有效即在该区间内机械臂关节角度不会超出关节限位; [3]. 以避关节限位为目标在有效臂角区间内进行最优臂角的选取,进而获取机械臂在给定末端位姿下的最优关节角度。 购前须知: 1. 代码均为个人手写,主要包含运动学建模全套代码; 2. 代码已经包含必要的注释; 包含原理推导文档,不包含绘图脚本以及urdf;