Skip to content

Instantly share code, notes, and snippets.

@johndemic
Created February 3, 2012 20:15
Show Gist options
  • Save johndemic/1732188 to your computer and use it in GitHub Desktop.
Save johndemic/1732188 to your computer and use it in GitHub Desktop.
Mule Configuration for HornetQ
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/3.2/mule-jms.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
">
<spring:beans>
<util:map id="jmsProperties">
<spring:entry key="host" value="${hornetq.host}"/>
<spring:entry key="port" value="${hornetq.port}"/>
</util:map>
<spring:bean name="transportConfiguration"
class="org.hornetq.api.core.TransportConfiguration">
<spring:constructor-arg value="org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"/>
<spring:constructor-arg ref="jmsProperties"/>
</spring:bean>
<spring:bean name="connectionFactory"
class="org.hornetq.jms.client.HornetQJMSConnectionFactory">
<spring:constructor-arg index="0" value="false"/>
<spring:constructor-arg index="1" ref="transportConfiguration"/>
<spring:property name="reconnectAttempts" value="-1"/>
<spring:property name="retryInterval" value="5000"/>
</spring:bean>
</spring:beans>
<jms:connector name="jmsConnector"
connectionFactory-ref="connectionFactory"
specification="1.1"/>
</mule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment