db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/platforms PlatformDefaultImpl.java
Date Tue, 24 Dec 2002 13:15:56 GMT
arminw      2002/12/24 05:15:56

  Modified:    src/java/org/apache/ojb/broker/platforms
                        PlatformDefaultImpl.java
  Log:
  code beautification
  
  Revision  Changes    Path
  1.10      +13 -15    jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java
  
  Index: PlatformDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/platforms/PlatformDefaultImpl.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PlatformDefaultImpl.java	13 Nov 2002 21:47:39 -0000	1.9
  +++ PlatformDefaultImpl.java	24 Dec 2002 13:15:56 -0000	1.10
  @@ -74,12 +74,19 @@
   public class PlatformDefaultImpl implements Platform, JoinSyntaxTypes
   {
       private Logger log = LoggerFactory.getLogger(PlatformDefaultImpl.class);
  +
       private boolean ignoreAutocommitExceptions;
       private boolean m_batchUpdatesChecked = false;
       private boolean m_supportsBatchUpdates = false;
  -
       private int useAutoCommit;
   
  +    public void configure(Configuration config) throws ConfigurationException
  +    {
  +        PlatformConfiguration myConfig = (PlatformConfiguration) config;
  +        ignoreAutocommitExceptions = myConfig.ignoreAutocommitExceptions();
  +        useAutoCommit = myConfig.useAutoCommit();
  +    }
  +
       public boolean supportsBatchOperations()
       {
           return m_supportsBatchUpdates;
  @@ -97,7 +104,7 @@
               }
               catch (SQLException e)
               {
  -                e.printStackTrace();
  +                log.error("batch support check failed",e);
                   m_supportsBatchUpdates = false;
               }
               finally
  @@ -150,8 +157,7 @@
                   }
                   catch (SQLException e)
                   {
  -                    Logger logger = LoggerFactory.getDefaultLogger();
  -                    logger.info("Connection initializing: setAutoCommit jdbc-driver problems.
" + e.getMessage());
  +                    log.info("Connection initializing: setAutoCommit jdbc-driver problems.
" + e.getMessage());
                       if (!ignoreAutocommitExceptions)
                       {
                           throw new PlatformException("Connection initializing: setAutoCommit(true)
failed", e);
  @@ -165,8 +171,7 @@
                   }
                   catch (SQLException e)
                   {
  -                    Logger logger = LoggerFactory.getDefaultLogger();
  -                    logger.info("Connection initializing: setAutoCommit jdbc-driver problems.
" + e.getMessage());
  +                    log.info("Connection initializing: setAutoCommit jdbc-driver problems.
" + e.getMessage());
                       if (!ignoreAutocommitExceptions)
                       {
                           throw new PlatformException("Connection initializing: setAutoCommit(false)
failed", e);
  @@ -254,15 +259,8 @@
           return SQL92_JOIN_SYNTAX;
       }
   
  -    public void configure(Configuration config) throws ConfigurationException
  -    {
  -        PlatformConfiguration myConfig = (PlatformConfiguration) config;
  -        ignoreAutocommitExceptions = myConfig.ignoreAutocommitExceptions();
  -        useAutoCommit = myConfig.useAutoCommit();
  -    }
  -    
       /**
  -     * Override default ResultSet size determination (rs.last();rs.getRow()) 
  +     * Override default ResultSet size determination (rs.last();rs.getRow())
        * with select count(*) operation
        * @see Platform#useCountForResultsetSize()
        */
  @@ -270,5 +268,5 @@
       {
       	return false;
       }
  -    
  +
   }
  
  
  

Mime
View raw message