Changeset 10088


Ignore:
Timestamp:
2005-06-14T11:10:40+12:00 (19 years ago)
Author:
kjdon
Message:

now keep a reference to the class loader

File:
1 edited

Legend:

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

    r9874 r10088  
    8787    protected HashMap format_info_map = null;
    8888
     89    /** A class loader that knows about the collection resources directory
     90     *  can put properties files, dtds etc  in here */
     91    CollectionClassLoader class_loader = null;
     92   
    8993    /** sets the cluster name */
    9094    public void setClusterName(String cluster_name) {
     
    131135     */
    132136    public boolean configure(Element info) {
     137    // set up the class loader
     138    this.class_loader = new CollectionClassLoader(this.getClass().getClassLoader(), this.site_home, this.cluster_name);
     139   
    133140    return configure(info, null);
    134141    }
     
    349356
    350357    // we want to use the collection class loader in case there are coll specific files
    351     CollectionClassLoader class_loader = new CollectionClassLoader(this.site_home, this.cluster_name);
    352    
    353358    if (dictionary != null) {
    354359        // just try the one specified dictionary
    355         Dictionary dict = new Dictionary(dictionary, lang, class_loader);
     360        Dictionary dict = new Dictionary(dictionary, lang, this.class_loader);
    356361        String result = dict.get(key, args);
    357362        if (result == null) { // not found
     
    364369    String class_name = this.getClass().getName();
    365370    class_name = class_name.substring(class_name.lastIndexOf('.')+1);
    366     Dictionary dict = new Dictionary(class_name, lang, class_loader);
     371    Dictionary dict = new Dictionary(class_name, lang, this.class_loader);
    367372    String result = dict.get(key, args);
    368373    if (result != null) {
     
    379384        break;
    380385        }
    381         dict = new Dictionary(class_name, lang, class_loader);
     386        dict = new Dictionary(class_name, lang, this.class_loader);
    382387        result = dict.get(key, args);
    383388        c = c.getSuperclass();
Note: See TracChangeset for help on using the changeset viewer.