修改zookeeper实现
git-svn-id: http://code.alibabatech.com/svn/dubbo/trunk@70 1a56cb94-b969-4eaa-88fa-be21384802f2
This commit is contained in:
parent
74c0ae95dc
commit
30bdf6ae08
|
|
@ -61,7 +61,12 @@ public class ZookeeperRegistry implements Registry {
|
|||
public ZookeeperRegistry(URL url) {
|
||||
this.url = url;
|
||||
try {
|
||||
this.zookeeper = new ZooKeeper(url.getAddress(), url.getPositiveIntParameter(
|
||||
String address = url.getAddress();
|
||||
String backup = url.getParameter(Constants.BACKUP_KEY);
|
||||
if (backup != null && backup.length() > 0) {
|
||||
address = address + "," + backup;
|
||||
}
|
||||
this.zookeeper = new ZooKeeper(address, url.getPositiveIntParameter(
|
||||
Constants.TIMEOUT_KEY, 5000), new Watcher() {
|
||||
public void process(WatchedEvent event) {
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue