logger.logMessage(Logger.ERROR,Logger.DB_QUERY, "Connection was " + dbConnection + " is closed " + dbConnection.isClosed());
  protected synchronized int getLargestRunNumber(){    int ret=0;    try{      if (dbConnection.isClosed()) {	dbConnection=getNewDBConnection(dgConfig.getDBConfig());      }      Statement s=dbConnection.createStatement();      if(s==null){	logger.logMessage(Logger.ERROR,Logger.DB_CONNECT,			  "Could not create statement from connection");	return ret;      }      ResultSet rs=s.executeQuery("SELECT MAX("+COL_RUNID+") FROM "+				  getRunTableName());      if(rs.next()){	ret=rs.getInt(1);      }else{	logger.logMessage(Logger.WARNING,Logger.DB_QUERY,			  "Empty set obtaining largest run number");      }      s.close();    }catch(SQLException e){      logger.logMessage(Logger.ERROR,Logger.DB_QUERY,			"Could not obtain largest run number",e);      logger.logMessage(Logger.ERROR,Logger.DB_QUERY,			"Connection was " + dbConnection + 			" is closed " + dbConnection.isClosed());      e.printStackTrace();    }    return ret;  }