Question

I'm trying to connect Mule ESB to an existing OpenMQ broker. Building from the mulesoft docs for openmq integration, I have the following flow;

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

However, I get an error at runtime;

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

I have the feeling several elements have been left out of the example. Can someone tell me what's missing?

Was it helpful?

Solution

AFAIK custom-connector needs a class that extends org.mule.transport.jms.JmsConnector. Try this instead:

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

<jms:connector name="JMSConnector"
    connectionFactory-ref="connectionFactory"
    specification="1.1"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top