Ignore:
Timestamp:
2009-12-09T15:28:39+13:00 (14 years ago)
Author:
kjdon
Message:

a little bit of code rearranging and editing so that we can have a serviceRackList in collectionConfig.xml (as well as buildConfig.xml) - may want to manually specify one and not have to edit the file each time after a rebuild

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/ServiceCluster.java

    r16688 r21312  
    205205   
    206206    // do the service racks
     207    // empty the service map in case this is a reconfigure
     208    clearServices();
    207209    Element service_rack_list = (Element)GSXML.getChildByTagName(service_cluster_info, GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER);
    208210    if (service_rack_list == null) {
     
    274276    return true;
    275277    }
    276    
     278
     279   
     280  protected void clearServices() {
     281    service_map.clear();
     282    this.service_list = this.doc.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER);
     283  }
    277284    /** creates and configures all the services - extra_info is some more xml
    278285that is passed to teh service  - eg used for coll config files for Collection
     
    280287    protected boolean configureServiceRack(Element service_rack_list,
    281288                       Element extra_info) {
    282 
    283     // empty the service map in case this is a reconfigure
    284     service_map.clear();
    285     this.service_list = this.doc.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER);
    286289
    287290    // create all the services
     
    607610    if (subset.equals(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER)) {
    608611        Element service_rack_list = (Element)GSXML.getChildByTagName(cluster_config_elem, GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER);
    609        
     612        clearServices();
    610613        return configureServiceRack(service_rack_list, null);
    611614    } else if (subset.equals(GSXML.METADATA_ELEM+GSXML.LIST_MODIFIER)) {
Note: See TracChangeset for help on using the changeset viewer.