Hmmm ...
I changed my xml to this:
...
<network>
<port auto-increment="true">5701</port>
<join>
<multicast enabled="false"/>
<tcp-ip enabled="true"/>
</join>
<interfaces enabled="true"/>
</network>
...
And my code to this (as per your instructions):
Config cfg = new XmlConfigBuilder().build();
cfg.getNetworkConfig().getJoin().getMulticastConfig().setEnabled
(false);
JoinMembers tcpconfig = cfg.getNetworkConfig().getJoin().getJoinMembers
();
tcpconfig.setEnabled(true);
List<String> lsMembers = tcpconfig.getMembers();
lsMembers.clear();
lsMembers.add("192.168.0.1");
lsMembers.add("192.168.0.2");
No go. I also tried adding:
tcpconfig.setMembers(lsMembers);
cfg.getNetworkConfig().getJoin().setJoinMembers(tcpconfig);
I keep getting:
com.hazelcast.impl.AddressPicker pickAddress
GRAVE: Hazelcast CANNOT start on this node. No matching network
interface found.
Interface matching must be either disabled or updated in the
hazelcast.xml config file.
java.lang.RuntimeException: Hazelcast CANNOT start on this node. No
matching network interface found.
Interface matching must be either disabled or updated in the
hazelcast.xml config file.
at com.hazelcast.impl.AddressPicker.pickAddress
(AddressPicker.java:119)
at com.hazelcast.impl.Node.<init>(Node.java:191)
at com.hazelcast.impl.FactoryImpl.<init>(FactoryImpl.java:252)
at com.hazelcast.impl.FactoryImpl.newHazelcastInstanceProxy
(FactoryImpl.java:93)
at com.hazelcast.core.Hazelcast.newHazelcastInstance
(Hazelcast.java:171)
at com.vpfw.ClusterTest3.start(ClusterTest3.java:36)
at com.vpfw.ClusterTest3.main(ClusterTest3.java:19)
I'm not sure if the problem is my hazelcast.xml or my code. I'd like
to leave the xml as empty as possible and define everything
declaritavily.
Bob
> For more seehttp://
code.google.com/docreader/#p=hazelcast&s=hazelcast&t=ClusterTe...