Project

General

Profile

« Previous | Next » 

Revision 2752

Added by Matt Jones over 18 years ago

Metacat has had problems with threading issues when accessed from ecogrid. These problems may stem from the use of shared global variables within the servlet that are not protected against threading problems. We used a lot of these, which I am eliminating in this commit. Besides final variables used as constants (which are not a problem), now there are only three unprotected variables (sessionHash, logMetacat, and conn) which are harder to eliminate. I will be discussiong this with Sid tomorrow to see how to eliminate them.

View differences:

DBQuery.java
121 121
                double connTime = System.currentTimeMillis();
122 122

  
123 123
                // Execute the query
124
                DBQuery queryobj = new DBQuery(MetaCatUtil
125
                        .getOption("saxparser"));
124
                DBQuery queryobj = new DBQuery();
126 125
                FileReader xml = new FileReader(new File(xmlfile));
127 126
                Hashtable nodelist = null;
128 127
                //nodelist = queryobj.findDocuments(xml, null, null, useXMLIndex);
......
189 188
     * @param parserName the fully qualified name of a Java class implementing
190 189
     *            the org.xml.sax.XMLReader interface
191 190
     */
192
    public DBQuery(String parserName)
191
    public DBQuery()
193 192
    {
194
       this.parserName = parserName;
193
        String parserName = MetaCatUtil.getOption("saxparser");
194
        this.parserName = parserName;
195 195
    }
196 196

  
197 197

  

Also available in: Unified diff