2013-02-26 30 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