Hi Guys, Thanks for all those who helped, I have since solved the problem.
For reference, I have described all the things that went wrong (and a lot
was wrong!)

Firstly, all broker names must be different (and apparently '_' character
should not be used, i didn't verify this though, but i removed it just in
case)

Secondly, if stating static connections, the transportconnector should not
have a discoverURI

also, i was missing other smaller configuration settings like useJMX,
networkTTL. Below is my updated XML file

<beans>
<!-- Allows us to use system properties as variables in this configuration
file -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

<broker brokerName="broker1" useJmx="true"
xmlns="http://activemq.org/config/1.0";>

<managementContext>
<managementContext connectorPort="1199"
jmxDomainName="org.apache.activemq"/>
</managementContext>

<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="TC" uri="tcp://wilson_desktop:61616"/>       
</transportConnectors>

<!-- The store and forward broker networks -->    
<networkConnectors> 
        <networkConnector name="host1 and host2"
uri="static://(tcp://wilson_laptop:61616,tcp://wilson_vm:61616)"
dynamicOnly="true" networkTTL="3" />
</networkConnectors> 
</broker>
</beans>




Koka wrote:
> 
> Hi All,
> 
> I'm trying to set up a static network of brokers. my config xml looks like
> this:
> 
> <beans>
> <!-- Allows us to use system properties as variables in this configuration
> file -->
> <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
> 
> <broker brokerName="ActiveMQ_On_Comfsd001"
> xmlns="http://activemq.org/config/1.0";>
> 
> <managementContext>
> <managementContext connectorPort="1199"
> jmxDomainName="org.apache.activemq"/>
> </managementContext>
> 
> <!-- The transport connectors ActiveMQ will listen to -->
> <transportConnectors>
> <transportConnector name="TC_comfsd001" uri="tcp://comfsd001:61616"
> discoveryUri="multicast://default" />       
> </transportConnectors>
> 
> <!-- The store and forward broker networks -->    
> <networkConnectors> 
>       <networkConnector name="host1 and host2"
> uri="static://(tcp://mitacp52257:61616,tcp://mfriedman.dyndns.biz:61616)"/>
> </networkConnectors> 
> </broker>
> </xbeans>
> 
> When I start ActiveMQ, i get  something like:
> 
> WARN  NetworkConnector               - Could not start network bridge
> between: vm:?network=true and: tcp://mitacp52257:61616 due to:
> java.net.ConnectException: Connection refused
> INFO  NetworkConnector               - Establishing network connection
> between from vm:?network=true to tcp://mfriedman.dyndns.biz:61616
> INFO  TransportConnector             - Connector vm://null Stopped
> INFO  NetworkConnector               - Establishing network connection
> between from vm:?network=true to tcp://mitacp52257:61616
> INFO  BrokerService                  - ActiveMQ 4.1.1 JMS Message Broker
> (null) is starting
> INFO  BrokerService                  - For help or more information please
> see: http://incubator.apache.org/activemq/
> INFO  faultPersistenceAdapterFactory - Journal is locked... waiting 10
> seconds for the journal to be unlocked.
> WARN  ManagementContext              - Failed to start jmx connector:
> Cannot bind to URL [rmi://localhost:1099/jmxrmi]:
> javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is
> java.rmi.AlreadyBoundException: jmxrmi]
> 
> What am I doing wrong?
> 

-- 
View this message in context: 
http://www.nabble.com/Static-Network-of-brokers-tf4863557s2354.html#a13974506
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to