Revision 1030
Added by Jing Tao over 22 years ago
src/edu/ucsb/nceas/metacat/ForceReplicationHandler.java | ||
---|---|---|
101 | 101 |
return; |
102 | 102 |
} |
103 | 103 |
URL comeAndGetIt = null; |
104 |
conn = util.openDBConnection(); |
|
104 |
conn = util.getConnection(); |
|
105 |
// If no server in xml_replication table, metacat don't need do anything |
|
106 |
if (ReplicationHandler.buildServerList(conn)==null) |
|
107 |
{ |
|
108 |
return; |
|
109 |
} |
|
105 | 110 |
Enumeration keys = (ReplicationHandler.buildServerList(conn)).keys(); |
106 | 111 |
//get the list of servers |
107 | 112 |
while(keys.hasMoreElements()) |
... | ... | |
161 | 166 |
//the URL never directly replies to the request. this simply |
162 | 167 |
//invoces a read request from the server to this local machine. |
163 | 168 |
}//while |
164 |
conn.close();
|
|
169 |
util.returnConnection(conn);
|
|
165 | 170 |
}//try |
166 | 171 |
catch(Exception e) |
167 | 172 |
{ |
Also available in: Unified diff
Add a control to handle if the server list is empty.