Ignore:
Timestamp:
2022-12-07T13:54:29+13:00 (18 months ago)
Author:
kjdon
Message:

the custom class loader now uses site resources file if no cluster_name is set - ie its a site-wide service, not a collection-specific service.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/ServiceRack.java

    r36592 r36985  
    208208    public boolean configure(Element info, Element extra_info)
    209209    {
    210         // set up the class loader
    211       // this needs modifying if we ever have serviceracks at siteconfig level that want to use class loader
    212       this.class_loader = new CustomClassLoader(this.getClass().getClassLoader(), GSFile.collectionResourceDir(this.site_home, this.cluster_name));
    213         return true;
     210          // set up the class loader
     211          // are we in a collection?
     212          if (this.cluster_name != null) {
     213            this.class_loader = new CustomClassLoader(this.getClass().getClassLoader(), GSFile.collectionResourceDir(this.site_home, this.cluster_name));
     214            return true;
     215          }
     216          // we are at site level
     217          this.class_loader = new CustomClassLoader(this.getClass().getClassLoader(), GSFile.siteResourceDir(this.site_home));
     218          return true;
    214219    }
    215220
Note: See TracChangeset for help on using the changeset viewer.