Ignore:
Timestamp:
2007-10-11T10:01:08+13:00 (17 years ago)
Author:
qq6
Message:

updated by Shaoqun

File:
1 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/branches/3.03/src/java/org/greenstone/gsdl3/service/GS2MGRetrieve.java

    r14431 r14655  
    4545    private static final String DEFAULT_INDEX_LANGUAGE_ELEM = "defaultIndexLanguage";
    4646   
    47     private MGRetrieveWrapper mg_src = null;
    48 //    private MGWrapper mg_src = null;
    49    
     47    private static MGRetrieveWrapper mg_src = null;
    5048    private String mg_basedir = null;
    5149    private String mg_textdir = null;
     
    5452   
    5553    public GS2MGRetrieve () {
    56         this.mg_src = new MGRetrieveWrapper ();
     54    if (this.mg_src == null){
     55        this.mg_src = new MGRetrieveWrapper ();
     56    }
    5757    }
    5858   
     
    119119        }
    120120        Element content_node = this.doc.createElement (GSXML.NODE_CONTENT_ELEM);
    121        
    122        
     121               
    123122        String doc_content = null;
    124123       
    125124        //means that this.mg_src is up and running
    126125        if (has_default_index ){
    127             doc_content =  this.mg_src.getDocument (this.mg_basedir,
    128             this.mg_textdir, doc_num);
     126        synchronized(this.mg_src){
     127                String indexpath = GSFile.collectionIndexPath(this.index_stem, this.default_index);       
     128        doc_content =  this.mg_src.getDocument (this.mg_basedir,
     129                            this.mg_textdir, doc_num);
     130        }
    129131        }
    130132       
     
    143145        return content_node;
    144146       
    145     }
    146    
    147    
     147    }       
    148148}
Note: See TracChangeset for help on using the changeset viewer.