Connection configuration options

There are many ways of configuring Mule and many options that can be set. The following XML snippet shows two options for setting your connection configuration details. One uses the Connection URL the other uses direct properties to set a the connection details. Note: that the URL format allows for more freedom of configuration while the direct property approach will pickup the defaults for most values.

One reason you may wish to use the URL format is to specify a 'nofailover' mechanism so that you can better control via mule what occurs when the connection is lost.

See the Connection URL Format page for more details on setting the failover mechanism.

 <connector name="jmsConnector1" className="org.mule.providers.jms.JmsConnector">
      <properties>
        <property name="connectionFactoryClass" value="org.apache.qpid.client.AMQConnectionFactory"/>

        ...

        <!-- Property entry for using a URL -->
        <map name="connectionFactoryProperties">
            <property name="connectionURLString" value="amqp://guest:guest@clientID/test?brokerlist='tcp://localhost:5672'"/>
        </map>

        <!-- Property entry for using individual values -->
        <!-- Note: that you can only set the following items -->
        <!-- All other values will be defaulted. -->
        <!--map name="connectionFactoryProperties">
            <property name="virtualPath" value="/test"/>
            <property name="host" value="localhost"/>
            <property name="port" value="5672"/>
            <property name="defaultUsername" value="guest"/>
            <property name="defaultPassword" value="guest"/>
        </map-->

      </properties>      
  </connector>

  • No labels