db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From olegn...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer ConnectionManager.java ConnectionManagerImpl.java
Date Sun, 16 Feb 2003 17:22:11 GMT
olegnitz    2003/02/16 09:22:10

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        ConnectionManager.java ConnectionManagerImpl.java
  Log:
  BugFix: batch mode sometimes were determined incorrectly
  because before first Connection is created
  platform.supportsBatchOperations() returns false irrespective of JDBC driver
  
  Revision  Changes    Path
  1.26      +5 -5      db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManager.java
  
  Index: ConnectionManager.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManager.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- ConnectionManager.java	15 Jan 2003 10:43:28 -0000	1.25
  +++ ConnectionManager.java	16 Feb 2003 17:22:10 -0000	1.26
  @@ -143,11 +143,11 @@
               if (log.isDebugEnabled()) log.debug("Request new connection from ConnectionFactory:
" + con);
           }
   
  -        if (batchMode)
  +        if (isBatchMode())
           {
               if (batchCon == null)
               {
  -                batchCon = new BatchConnection(con);
  +                batchCon = new BatchConnection(con, broker);
               }
               return batchCon;
           }
  @@ -307,7 +307,7 @@
        */
       public void setBatchMode(boolean mode)
       {
  -        batchMode = (mode && platform.supportsBatchOperations());
  +        batchMode = mode;
       }
   
       /**
  @@ -315,7 +315,7 @@
        */
       public boolean isBatchMode()
       {
  -        return batchMode;
  +        return batchMode && platform.supportsBatchOperations();
       }
   
       /**
  
  
  
  1.3       +5 -5      db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerImpl.java
  
  Index: ConnectionManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/ConnectionManagerImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConnectionManagerImpl.java	19 Jan 2003 15:32:31 -0000	1.2
  +++ ConnectionManagerImpl.java	16 Feb 2003 17:22:10 -0000	1.3
  @@ -139,11 +139,11 @@
               if (log.isDebugEnabled()) log.debug("Request new connection from ConnectionFactory:
" + con);
           }
   
  -        if (batchMode)
  +        if (isBatchMode())
           {
               if (batchCon == null)
               {
  -                batchCon = new BatchConnection(con);
  +                batchCon = new BatchConnection(con, broker);
               }
               return batchCon;
           }
  @@ -303,7 +303,7 @@
        */
       public void setBatchMode(boolean mode)
       {
  -        batchMode = (mode && platform.supportsBatchOperations());
  +        batchMode = mode;
       }
   
       /**
  @@ -311,7 +311,7 @@
        */
       public boolean isBatchMode()
       {
  -        return batchMode;
  +        return batchMode && platform.supportsBatchOperations();
       }
   
       /**
  
  
  

Mime
View raw message