You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2003/03/20 20:13:55 UTC

cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer ConnectionManagerImpl.java

arminw      2003/03/20 11:13:55

  Modified:    src/java/org/apache/ojb/broker/accesslayer
                        ConnectionManagerImpl.java
  Log:
  only enable batch-mode when user set attribute
  'true' till problem with batch-mode are solved.
  This allows user to set batch mode 'true' in code
  but give full control via configuration file 'batch-mode'
  attribute.
  
  Revision  Changes    Path
  1.4       +16 -3     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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ConnectionManagerImpl.java	16 Feb 2003 17:22:10 -0000	1.3
  +++ ConnectionManagerImpl.java	20 Mar 2003 19:13:55 -0000	1.4
  @@ -298,12 +298,25 @@
       }
   
       /**
  -     * Sets the batch mode on or off.
  +     * Sets the batch mode on or off - this
  +     * switch only works if you set attribute <code>batch-mode</code>
  +     * in <code>jdbc-connection-descriptor</code> true and your database
  +     * support batch mode.
  +     *
        * @param mode the batch mode
        */
       public void setBatchMode(boolean mode)
       {
  -        batchMode = mode;
  +        /*
  +        arminw:
  +        HACK,
  +        only enable batch-mode when user set attribute
  +        'true' till problem with batch-mode are solved.
  +        This allows user to set batch mode 'true' in code
  +        but give full control via configuration file 'batch-mode'
  +        attribute.
  +        */
  +        batchMode = mode && jcd.getBatchMode();
       }
   
       /**