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 ResultSetAndStatement.java
Date Sat, 05 Nov 2005 16:19:36 GMT
arminw      2005/11/05 08:19:36

  Modified:    src/java/org/apache/ojb/broker/accesslayer Tag:
                        OJB_1_0_RELEASE ResultSetAndStatement.java
  Log:
  remove redundant resource check (it's a internal class and we should take care of resource
leaks by ourselves) in finalize method
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.13.2.3  +21 -21    db-ojb/src/java/org/apache/ojb/broker/accesslayer/ResultSetAndStatement.java
  
  Index: ResultSetAndStatement.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ResultSetAndStatement.java,v
  retrieving revision 1.13.2.2
  retrieving revision 1.13.2.3
  diff -u -r1.13.2.2 -r1.13.2.3
  --- ResultSetAndStatement.java	9 Oct 2005 23:50:45 -0000	1.13.2.2
  +++ ResultSetAndStatement.java	5 Nov 2005 16:19:36 -0000	1.13.2.3
  @@ -19,8 +19,6 @@
   import java.sql.Statement;
   
   import org.apache.ojb.broker.accesslayer.sql.SelectStatement;
  -import org.apache.ojb.broker.util.logging.Logger;
  -import org.apache.ojb.broker.util.logging.LoggerFactory;
   
   /**
    * Intern used wrapper for {@link Statement} and {@link ResultSet} instances.
  @@ -29,7 +27,7 @@
    */
   public class ResultSetAndStatement
   {
  -    private static Logger log = LoggerFactory.getLogger(ResultSetAndStatement.class);
  +	// private static Logger log = LoggerFactory.getLogger(ResultSetAndStatement.class);
   
   	private final StatementManagerIF manager;
       private boolean isClosed;
  @@ -65,21 +63,23 @@
           }
       }
   
  -    protected void finalize() throws Throwable
  -    {
  -        super.finalize();
  -        if(!isClosed && (m_stmt != null || m_rs != null))
  -        {
  -            log.warn("** Associated resources (Statement/ResultSet) not closed!" +
  -                    " Try automatic cleanup **");
  -            try
  -            {
  -                close();
  -            }
  -            catch (Exception ignore)
  -            {
  -                //ignore it                
  -            }
  -        }
  -    }
  +// arminw: This class is internaly used, thus we should take care to close all used
  +// resources without this check.
  +//    protected void finalize() throws Throwable
  +//    {
  +//        super.finalize();
  +//        if(!isClosed && (m_stmt != null || m_rs != null))
  +//        {
  +//            log.warn("** Associated resources (Statement/ResultSet) not closed!" +
  +//                    " Try automatic cleanup **");
  +//            try
  +//            {
  +//                close();
  +//            }
  +//            catch (Exception ignore)
  +//            {
  +//                //ignore it
  +//            }
  +//        }
  +//    }
   }
  
  
  

---------------------------------------------------------------------
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