Changeset 16630

Show
Ignore:
Timestamp:
01.08.2008 14:18:07 (11 years ago)
Author:
xiao
Message:

modify to synchronize method executeQuery

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/src/java/org/greenstone/gsdl3/sql/derby/DerbyDBWrapper.java

    r16260 r16630  
    6363    try{ 
    6464        connection.setAutoCommit(false);     
    65         statement = connection.createStatement(); 
     65        statement = connection.createStatement(); 
    6666    } 
    6767    catch(SQLException sqle){ 
     
    7373 
    7474    //return a list of rows array->hashmap 
    75     public ArrayList executeQuery(String query_statement){ 
     75    public synchronized ArrayList executeQuery(String query_statement){ 
    7676    //the database hasn't been correct yet 
    77         ArrayList results = null; 
     77        ArrayList results = new ArrayList(); 
    7878    try{     
    7979         
     
    8282            return new ArrayList(); 
    8383        } 
    84      
    85         results = new ArrayList(); 
    86  
    8784     
    8885        ResultSet rs = statement.executeQuery(query_statement);