Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updates as per SM-1881 suggestions

...

Code Block
XML
XML
borderStylesolid
  <!-- We use 0.0.0.0 per AMQ-2094 -->
  <amq:transportConnectors>
     <amq:transportConnector uri="tcp://localhost0.0.0.0:61616"/>
  </amq:transportConnectors>

  <amq:persistenceAdapter>
      <amq:journaledJDBCamqPersistenceAdapter journalLogFilesdirectory="5" dataDirectory="/file:<shared>/data/amq"/>
  </amq:persistenceAdapter>

...

Code Block
XML
XML
borderStylesolid
  <amq:transportConnectors>
     <amq:transportConnector uri="tcp://localhost0.0.0.0:61616"/>
  </amq:transportConnectors>

  <amq:persistenceAdapter>
      <amq:journaledJDBCamqPersistenceAdapter journalLogFilesdirectory="5" dataDirectory="/file:<shared>/data/amq"/>
  </amq:persistenceAdapter>

Info
titlePlease Note
  • Both configurations use the exact same dataDirectory.
  • Both configurations use the exact same transportConnector configuration. There will NOT be a port conflict as the slaves {{TransportConnector}}s will not be activated until a failover event occurs.
  • This example is for a shared filesystem master/slave. For shared JDBC master/slave you would modify the persistence adapter so that both instances point to the same dataSource, for example:
Code Block
XML
XML
borderStylesolid
<amq:persistenceAdapter>
      <amq:jdbcPersistenceAdapter dataSource="#oracle-ds" /> 
</amq:persistenceAdapter>

<bean id="oracle-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
 	 <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> 
  <property name="url" value="jdbc:oracle:thin:@192.168.1.4:1521:mydbname" /> 
  <property name="username" value="smix_node1_ha" /> 
  <property name="password" value="smix_node1_ha" /> 
  <property name="poolPreparedStatements" value="true" /> 
</bean>

  • With ServiceMix 4, you will be able to use SERVICEMIX_BASE to specify the <servicemix>/conf directory so two installs will not be necessary.

...

Code Block
XML
XML
borderStylesolid

<!-- We are setting our brokerName to be unique for this container -->
<amq:broker id="broker" brokerName="host1_broker1" depends-on="jmxServer">

   ....

   <networkConnectors>
      <networkConnector name="host1_to_host2" uri="static://(tcp://host2:61616)"/>

      <!-- Here's what it would like for a three container network -->
      <!-- (Note its not necessary to list our own hostname in the uri list) -->
      <!-- networkConnector name="host1_to_host2_host3" uri="static://(tcp://host2:61616,tcp://host3:61616)"/ -->

   </networkConnectors>

</amq:broker>

...