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/core PersistenceBrokerImpl.java
Date Mon, 30 Jun 2003 18:32:50 GMT
arminw      2003/06/30 11:32:50

  Modified:    src/java/org/apache/ojb/broker/core
                        PersistenceBrokerImpl.java
  Log:
  Running test-suite with batch-mode 'true'
  cause many unexpected failures and errors.
  Thus set batch mode explicit to 'false'
  when closing PB instance - solve most
  problems.
  
  Revision  Changes    Path
  1.18      +14 -5     db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- PersistenceBrokerImpl.java	25 Jun 2003 20:30:58 -0000	1.17
  +++ PersistenceBrokerImpl.java	30 Jun 2003 18:32:50 -0000	1.18
  @@ -318,8 +318,17 @@
               if (connectionManager != null)
               {
                   connectionManager.releaseConnection();
  +                /*
  +                arminw:
  +                set batch mode explicit to 'false'. Using
  +
                   connectionManager.setBatchMode(
                           connectionManager.getConnectionDescriptor().getBatchMode());
  +
  +                cause many unexpected junit failures/errors when running
  +                test suite with batch-mode 'true' setting.
  +                */
  +                connectionManager.setBatchMode(false);
               }
               removeAllListeners();
           }
  @@ -692,13 +701,13 @@
        * @param rds
        */
       private void assertFkAssignment(Object obj, Object ref, ObjectReferenceDescriptor rds)
  -    {      
  +    {
           Class objClass = ProxyHelper.getRealClass(obj);
           ClassDescriptor objCld = descriptorRepository.getDescriptorFor(objClass);
           FieldDescriptor[] objFkFields = rds.getForeignKeyFieldDescriptors(objCld);
   
            // MBAIRD
  -         // we have 'disassociated' this object from the referenced object, 
  +         // we have 'disassociated' this object from the referenced object,
            // the object representing the ord is now null, so set the fk to null.
           if (ref == null)
           {
  @@ -800,7 +809,7 @@
                       {
                           // 1. Store depended upon object first to avoid FK violation
                           storeCollectionObject(cds, otherObj);
  -                        
  +
                           // 2. Store indirection record
                           storeMtoNImplementor(cds, obj, otherObj, currentMtoNKeys);
                       }
  @@ -840,7 +849,7 @@
               if(logger.isEnabledFor(Logger.INFO)) logger.info("Cascade store for this collection-descriptor
(" + cds.getAttributeName()
                       + ") was set to false.");
           }
  -        
  +
       }
   
       /**
  
  
  

Mime
View raw message