2013-02-26 83 views
0

我试图将Mule ESB连接到现有的OpenMQ代理。从mulesoft docs for openmq integration构建,我有以下流程;将Mule ESB连接到OpenMQ Broker

<jms:custom-connector name="Custom_JMS" specification="1.1" 
         class="com.sun.messaging.ConnectionFactory" 
         validateConnections="true" doc:name="Custom JMS"/> 

<flow name="EchoFlow" doc:name="EchoFlow"> 

    <jms:inbound-endpoint doc:name="JMS" 
          connector-ref="Custom_JMS" responseTimeout="1000" 
          topic="mytopic"/> 

    <echo-component doc:name="Echo"/> 
    <logger message="#[message:payload]" doc:name="Logger"/> 
</flow> 

但是,我在运行时遇到错误,

[02-26 10:54:08] ERROR DefaultMuleApplication [main]: null 
org.springframework.beans.NotWritablePropertyException: Invalid property 'acknowledgementMode' of bean class [com.sun.messaging.ConnectionFactory]: Bean property 'acknowledgementMode' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 

我感觉有几个元素已被排除在示例之外。有人能告诉我什么是缺少的?

回答

2

AFAIK custom-connector需要一个延伸org.mule.transport.jms.JmsConnector的类。试试这个:

<spring:bean name="connectionFactory" class="com.sun.messaging.ConnectionFactory"/> 

<jms:connector name="JMSConnector" 
    connectionFactory-ref="connectionFactory" 
    specification="1.1"/> 
+0

我明白我是如何误解Mulesoft页面的 - 现在它不显示。以上工作,但失败,因为openMQ代理不在本地主机:7676(omq默认值)。我试图用bean上的一个属性提供正确的地址; 但导致“bean属性imqAddressList”不可写或具有无效的setter方法... “我要阅读春季文档和实验,但也许你马上知道答案? – CAB 2013-02-27 14:47:56

+0

找到我在回答另一个omq问题here的答案。 – CAB 2013-02-27 15:14:53