六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 158|回复: 0

VM Transport的使用

[复制链接]

升级  68%

8

主题

8

主题

8

主题

童生

Rank: 1

积分
34
 楼主| 发表于 2013-2-7 19:55:46 | 显示全部楼层 |阅读模式
"The VM transport is used for intra-VM communication between components managed by Mule."
mule-config.xml里加入如下入口:
<inbound>    <vm:inbound-endpoint address="vm://vmtest" /></inbound>从程序里面启动mule服务,和往这个入口传参数:
MuleServer server = new MuleServer("conf/mule-config.xml"); server.start(false, false);......MuleClient client = new MuleClient();message = client.send("vm://vmtest","string",null); 要注意的是必须从程序里启动mule服务。若是用右键mule-config.xml Run as Mule Server,再在程序里只用
MuleClient client = new MuleClient();message = client.send("vm://vmtest","string",null); 就会出现如下错误:
********************************************************************************Message               : There is no receiver registered on connector "connector.VM.0" for endpointUri vm://vmtestType                  : org.mule.api.transport.NoReceiverForEndpointExceptionCode                  : MULE_ERROR-67001JavaDoc               : http://www.mulesource.org/docs/site/current2/apidocs/org/mule/api/transport/NoReceiverForEndpointException.html******************************************************************************** 
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表