http://activemq.apache.org/jdbc-master-slave.html
<!– Oracle DataSource Sample Setup –>
<!–
<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:@localhost:1521:AMQDB"/>
<property name="username" value="scott"/>
<property name="password" value="tiger"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
–>
<!– The store and forward broker networks ActiveMQ will listen to –>
<networkConnectors>
<networkConnector name="HA Queue"
uri="static://(tcp://10.0.1.199:61616,tcp://10.0.1.219:61616)" />
</networkConnectors>
***DAQ*** OpenWire is for c++, Java and .NET.
failover:(tcp://broker1:61616,tcp://broker2:61616)?initialReconnectDelay=100,?randomize=false
Manning Example URI
failover:(tcp://localhost:61616,tcp://remotehost:61616)?initialReconnectDelay=100
If the above gives errors try it this way (this way works in ActiveMQ 4.1.1 the one above does not)
failover://(tcp://localhost:61616,tcp://remotehost:61616)?initialReconnectDelay=100
Sample program and config of M/S amq.
http://osdir.com/ml/java.activemq.user/2006-05/msg00031.html
http://servicemix.apache.org/clustering.html