db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/platforms PlatformMsAccessImpl.java
Date Sun, 26 Jan 2003 12:44:37 GMT
thma        2003/01/26 04:44:37

  Modified:    src/java/org/apache/ojb/broker/platforms
                        PlatformMsAccessImpl.java
  Log:
  fix MS access problems (thanks to Ralf Schaeftlein for finding this bug)
  
  Revision  Changes    Path
  1.3       +20 -0     jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMsAccessImpl.java
  
  Index: PlatformMsAccessImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMsAccessImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PlatformMsAccessImpl.java	17 Jun 2002 19:34:11 -0000	1.2
  +++ PlatformMsAccessImpl.java	26 Jan 2003 12:44:37 -0000	1.3
  @@ -56,9 +56,13 @@
   
   import java.math.BigDecimal;
   import java.sql.PreparedStatement;
  +import java.sql.ResultSet;
   import java.sql.SQLException;
  +import java.sql.Statement;
   import java.sql.Types;
   
  +import org.apache.ojb.broker.util.logging.LoggerFactory;
  +
   /**
    * @version 	1.0
    * @author 	jakob bräuchi
  @@ -103,5 +107,21 @@
       {
           return true;
       }
  +
  +    public void beforeStatementClose(Statement stmt, ResultSet rs) throws PlatformException
  +    {
  +        if (rs != null)
  +        {
  +            try
  +            {
  +                rs.close();
  +            }
  +            catch (SQLException e)
  +            {
  +            	LoggerFactory.getDefaultLogger().warn("Resultset closing failed (can be ignored
for MsAccess)");
  +            }
  +        }
  +    }
  +
   
   }
  
  
  

Mime
View raw message