Project

General

Profile

« Previous | Next » 

Revision 1757

Added by Jing Tao over 21 years ago

Revise inital value for insert a new server. Change some debug level.

View differences:

src/edu/ucsb/nceas/metacat/DocumentImpl.java
488 488
      // Set auto commit fasle
489 489
      dbconn.setAutoCommit(false);
490 490
      pstmt = dbconn.prepareStatement(sql.toString());
491
      MetaCatUtil.debugMessage("3, new sql for todate:================== "+
492
                               sql.toString(), 1);
491
     
493 492
      pstmt.execute();
494 493
      // Commit the insert
495 494
      dbconn.commit();
......
2779 2778
        pStmt = dbConn.prepareStatement("INSERT INTO xml_replication " +
2780 2779
                      "(server, last_checked, replicate, datareplicate, hub) " +
2781 2780
                       "VALUES ('" + server + "', " + 
2782
                       dbAdapter.toDate("01/01/00", "MM/DD/YY") + ", '" +
2781
                       dbAdapter.toDate("01/01/80", "MM/DD/YY") + ", '" +
2783 2782
                       replicate +"', '"+dataReplicate+"','"+ hub + "')");
2784
        MetaCatUtil.debugMessage("4, new sql for todate:================== ", 1);
2783
        
2785 2784
                              
2786 2785
        pStmt.execute();
2787 2786
        dbConn.commit();
src/edu/ucsb/nceas/metacat/ReplicationHandler.java
611 611
         sql.append(dbAdapter.toDate(datestr, "MM/DD/YY HH24:MI:SS"));
612 612
         sql.append(" where server like '").append(server).append("'");
613 613
         pstmt = dbConn.prepareStatement(sql.toString());
614
         MetaCatUtil.debugMessage("6, new sql for todate:================== "+
615
                                   sql.toString(), 1);
614
       
616 615
         pstmt.executeUpdate();
617 616
         dbConn.commit();
618 617
         pstmt.close();
src/edu/ucsb/nceas/metacat/ReplicationServerList.java
452 452
        pStmt = dbConn.prepareStatement("INSERT INTO xml_replication " +
453 453
                      "(server, last_checked, replicate, datareplicate, hub) "+
454 454
                       "VALUES ('" + givenServerName + "', "+
455
                        dbAdapter.toDate("01/01/00","MM/DD/YY") + ", '" +
455
                        dbAdapter.toDate("01/01/80","MM/DD/YY") + ", '" +
456 456
                       replicate +"', '"+dataReplicate+"','"+ hub + "')");
457 457
        pStmt.execute();
458
        MetaCatUtil.debugMessage("7, new sql for todate:================== ", 1);
458
       
459 459
        pStmt.close();
460 460
      }//try
461 461
      catch (Exception e)

Also available in: Unified diff