db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer JdbcAccessImpl.java
Date Tue, 11 Nov 2003 00:07:04 GMT
arminw      2003/11/10 16:07:04

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        JdbcAccessImpl.java
  Log:
  add 'isDebugEnabled' check before log statements
  containing a persistence capable object. In most
  cases obj.toString() is very costly (string representation
  of a whole object graph)
  
  Revision  Changes    Path
  1.12      +6 -6      db-ojb/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java
  
  Index: JdbcAccessImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JdbcAccessImpl.java	9 Sep 2003 19:02:31 -0000	1.11
  +++ JdbcAccessImpl.java	11 Nov 2003 00:07:04 -0000	1.12
  @@ -115,7 +115,7 @@
        */
       public void executeDelete(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
       {
  -        logger.safeDebug("executeDelete", obj);
  +        if(logger.isDebugEnabled()) logger.safeDebug("executeDelete", obj);
   
           PreparedStatement stmt = null;
           try
  @@ -178,7 +178,7 @@
        */
       public void executeDelete(Query query, ClassDescriptor cld) throws PersistenceBrokerException
       {
  -        logger.safeDebug("executeDelete (by Query)", query);
  +        if(logger.isDebugEnabled()) logger.safeDebug("executeDelete (by Query)", query);
   
           PreparedStatement stmt = null;
   
  @@ -216,7 +216,7 @@
        */
       public void executeInsert(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
       {
  -        logger.safeDebug("executeInsert", obj);
  +        if(logger.isDebugEnabled()) logger.safeDebug("executeInsert", obj);
   
           PreparedStatement stmt = null;
           try
  @@ -278,7 +278,7 @@
       public ResultSetAndStatement executeQuery(Query query, ClassDescriptor cld)
           throws PersistenceBrokerException
       {
  -        logger.safeDebug("executeQuery", query);
  +        if(logger.isDebugEnabled()) logger.safeDebug("executeQuery", query);
   
           ResultSetAndStatement retval =
               new ResultSetAndStatement(broker.serviceConnectionManager().getSupportedPlatform());
  @@ -514,7 +514,7 @@
        */
       public void executeUpdate(ClassDescriptor cld, Object obj) throws PersistenceBrokerException
       {
  -        logger.safeDebug("executeUpdate", obj);
  +        if(logger.isDebugEnabled()) logger.safeDebug("executeUpdate", obj);
   
           PreparedStatement stmt = null;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message