Changeset 4000
- Timestamp:
- 2003-03-26T12:15:39+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/core/MessageRouter.java
r3971 r4000 61 61 /** site home - the home directory for the site */ 62 62 protected String site_home_=null; 63 /** the http address for this site */ 64 protected String site_http_address_=null; 65 63 66 /** the global name for this site */ 64 67 protected String global_site_name_=null; … … 188 191 public Element process(Element message) { 189 192 193 //System.out.println("MR received request"); 194 //System.out.println(converter_.getString(message)); 195 190 196 // check that its a correct message tag 191 197 if (!message.getTagName().equals(GSXML.MESSAGE_ELEM)) { … … 238 244 } // for each request 239 245 246 //System.out.println("MR returned response"); 247 //System.out.println(converter_.getString(mainResult)); 248 240 249 return mainResult; 241 250 … … 263 272 } else { 264 273 global_site_name_ = local_site_name.getAttribute(GSXML.VALUE_ATT); 274 } 275 276 Element http_address = (Element)GSXML.getChildByTagName(config, 277 GSXML.SITE_HTTP_ADDRESS_ELEM); 278 if (http_address == null) { 279 System.err.println("MessageRouter configure error: no http address in config file"); 280 return false; 281 } else { 282 site_http_address_ = http_address.getAttribute(GSXML.VALUE_ATT); 265 283 } 266 284 … … 284 302 ServiceCluster sc = new ServiceCluster(); 285 303 sc.setSiteHome(site_home_); 304 sc.setSiteAddress(site_http_address_); 286 305 sc.setClusterName(name); 287 306 sc.setMessageRouter(this); … … 324 343 ServiceRack s = (ServiceRack)Class.forName("org.greenstone.gsdl3.service."+service_name).newInstance(); 325 344 s.setSiteHome(site_home_); 345 s.setSiteAddress(site_http_address_); 326 346 s.setMessageRouter(this); 327 347 … … 478 498 c.setCollectionName(col_name); 479 499 c.setSiteHome(site_home_); 500 c.setSiteAddress(site_http_address_); 480 501 if (c.configure()) { 481 502 // this could be a reactivation, so delete the old version
Note:
See TracChangeset
for help on using the changeset viewer.