activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Javier Leyba" <xle...@gmail.com>
Subject Re: Loading configuration from properties file
Date Tue, 03 Apr 2007 08:40:39 GMT
On 4/2/07, Javier Leyba <xleyba@gmail.com> wrote:
>
> Also, I need to change the JMX port, how could I do it ?
>
>


Hi

I've solved it with this:

----------
service = new BrokerService();
    	service.setBrokerName(masterBrokerProps.getProperty("brokerName"));
       	service.setPersistent(true);
       	service.addConnector(masterBrokerProps
        			.getProperty("transportConnector"));
        	
       	service.addNetworkConnector(new URI(
        			masterBrokerProps.getProperty("networkConnector")));
        	
       	ManagementContext mc = new ManagementContext();
       	mc.setConnectorPort(Integer.parseInt(
        			masterBrokerProps.getProperty("connectorPort")));
       	mc.setJmxDomainName(masterBrokerProps.getProperty("jmxDomainName"));
       	service.setManagementContext(mc);
-----------


With propeties:

-------------
brokerName=MASTERUBUNTU
transportConnector=tcp://172.31.112.9:62002
networkConnector=static://(tcp://172.31.112.9:62003,tcp://172.31.27.1:62012,tcp://172.30.27.1:62014)?failover=true&dynamicOnly=true
connectorPort=2011
jmxDomainName=org.apache.activemq
----------------

I guess my config is ok but nevertheless I'm receiving the message:


---------------
10:39:25,122 WARN  [NetworkConnector] Could not start network bridge
between: vm://MASTERUBUNTU?network=true and: tcp://172.31.112.9:62003
due to: java.net.ConnectException: Connection refused
10:39:28,669 INFO  [NetworkConnector] Establishing network connection
between from vm://SLAVEUBUNTU?network=true to tcp://172.31.112.9:62005
10:39:28,670 WARN  [NetworkConnector] Could not start network bridge
between: vm://SLAVEUBUNTU?network=true and: tcp://172.31.112.9:62005
due to: java.net.ConnectException: Connection refused
10:39:30,125 INFO  [NetworkConnector] Establishing network connection
between from vm://MASTERUBUNTU?network=true to
tcp://172.31.112.9:62003
----------------

Is this ok or my config fails ?

Thanks in advance

J

Mime
View raw message