0

我正在尝试将 Mule ESB 连接到现有的 OpenMQ 代理。从用于 openmq 集成的 mulesoft 文档构建,我有以下流程;

<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?

我感觉这个例子中遗漏了几个元素。有人可以告诉我缺少什么吗?

4

1 回答 1

2

AFAIKcustom-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"/>
于 2013-02-26T23:12:08.653 回答