[metacat-cvs] metacat/src/edu/ucsb/nceas/metacat DBConnectionPool.java DBSAXHandler.java DocumentImpl.java

Saurabh Garg sgarg at ecoinformatics.org
Wed Nov 2 10:16:55 PST 2005


sgarg       05/11/02 10:16:55

  Modified:    src/edu/ucsb/nceas/metacat DBConnectionPool.java
                        DBSAXHandler.java DocumentImpl.java
  Log:
  Modified the debug levels of debug statements
  
  Revision  Changes    Path
  1.16      +11 -5     metacat/src/edu/ucsb/nceas/metacat/DBConnectionPool.java
  
  Index: DBConnectionPool.java
  ===================================================================
  RCS file: /cvs/metacat/src/edu/ucsb/nceas/metacat/DBConnectionPool.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DBConnectionPool.java	10 Oct 2005 17:44:02 -0000	1.15
  +++ DBConnectionPool.java	2 Nov 2005 18:16:54 -0000	1.16
  @@ -8,8 +8,8 @@
    *    Release: @release@
    *
    *   '$Author: sgarg $'
  - *     '$Date: 2005/10/10 17:44:02 $'
  - * '$Revision: 1.15 $'
  + *     '$Date: 2005/11/02 18:16:54 $'
  + * '$Revision: 1.16 $'
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
  @@ -651,8 +651,14 @@
        DBConnection conn = null; // the dbconnection
        connectionPoolSize = connectionPool.size();
        freeConnectionSize = getFreeDBConnectionNumber();
  -     logMetacat.warn("Connection pool size: " +connectionPoolSize);
  -     logMetacat.warn("Free Connection number: "+freeConnectionSize);
  +     if(freeConnectionSize < connectionPoolSize){
  +    	 int numberOfConnections = connectionPoolSize - freeConnectionSize;
  +    	 logMetacat.warn(numberOfConnections + "connections " +
  +    	 		"being used out of " +connectionPoolSize + " connections");
  +     } else {
  +    	 logMetacat.info("Connection pool size: " +connectionPoolSize);
  +    	 logMetacat.info("Free Connection number: "+freeConnectionSize);
  +     }
        difference = connectionPoolSize - freeConnectionSize;
        
        //If all connections are free and connection pool size greater than 
  
  
  
  1.102     +7 -4      metacat/src/edu/ucsb/nceas/metacat/DBSAXHandler.java
  
  Index: DBSAXHandler.java
  ===================================================================
  RCS file: /cvs/metacat/src/edu/ucsb/nceas/metacat/DBSAXHandler.java,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- DBSAXHandler.java	10 Oct 2005 17:53:07 -0000	1.101
  +++ DBSAXHandler.java	2 Nov 2005 18:16:54 -0000	1.102
  @@ -8,8 +8,8 @@
    *    Release: @release@
    *
    *   '$Author: sgarg $'
  - *     '$Date: 2005/10/10 17:53:07 $'
  - * '$Revision: 1.101 $'
  + *     '$Date: 2005/11/02 18:16:54 $'
  + * '$Revision: 1.102 $'
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
  @@ -530,7 +530,10 @@
                   long stopTime = System.currentTimeMillis();
                   if ((stopTime - startTime) > INDEXDELAY) { throw new Exception(
                           "Couldn't find the docid for index build in "
  -                                + "reseaonable time!"); }
  +                                + "reseaonable time!"); 
  +                	logMetacat.warn("Couldn't find the docid for index build in "
  +                            + "reseaonable time!");
  +                }
               }//while
           } catch (Exception e) {
               try {
  
  
  
  1.173     +3 -3      metacat/src/edu/ucsb/nceas/metacat/DocumentImpl.java
  
  Index: DocumentImpl.java
  ===================================================================
  RCS file: /cvs/metacat/src/edu/ucsb/nceas/metacat/DocumentImpl.java,v
  retrieving revision 1.172
  retrieving revision 1.173
  diff -u -r1.172 -r1.173
  --- DocumentImpl.java	1 Nov 2005 01:24:05 -0000	1.172
  +++ DocumentImpl.java	2 Nov 2005 18:16:54 -0000	1.173
  @@ -6,9 +6,9 @@
    *    Authors: Matt Jones
    *    Release: @release@
    *
  - *   '$Author: tao $'
  - *     '$Date: 2005/11/01 01:24:05 $'
  - * '$Revision: 1.172 $'
  + *   '$Author: sgarg $'
  + *     '$Date: 2005/11/02 18:16:54 $'
  + * '$Revision: 1.173 $'
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
  @@ -1451,7 +1451,7 @@
           pstmt.setString(1, familyId);
           int rows = pstmt.executeUpdate();
           pstmt.close();
  -        logMetacat.debug("Deleted " + rows + " rows from xml_index " +
  +        logMetacat.info("Deleted " + rows + " rows from xml_index " +
               "for document " + docid);
       }
   
  
  
  


More information about the Metacat-cvs mailing list