db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/singlevm PersistenceBrokerImpl.java
Date Thu, 27 Feb 2003 18:35:37 GMT
thma        2003/02/27 10:35:37

  Modified:    src/java/org/apache/ojb/broker/singlevm
                        PersistenceBrokerImpl.java
  Log:
  LoadedObjectRegistry fix by jamie burns
  
  Revision  Changes    Path
  1.136     +8 -9      db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerImpl.java
  
  Index: PersistenceBrokerImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/singlevm/PersistenceBrokerImpl.java,v
  retrieving revision 1.135
  retrieving revision 1.136
  diff -u -r1.135 -r1.136
  --- PersistenceBrokerImpl.java	27 Feb 2003 18:30:19 -0000	1.135
  +++ PersistenceBrokerImpl.java	27 Feb 2003 18:35:37 -0000	1.136
  @@ -763,14 +763,6 @@
                       continue;
                   }
   
  -                if (cds.isMtoNRelation())
  -                {
  -                    currentMtoNKeys = getMtoNImplementor(cds, obj);
  -                    
  -                    // delete unused m:n implementors
  -                    deleteMtoNImplementor(cds, obj, (Collection)col, currentMtoNKeys);
  -                }
  -
                   Iterator colIterator;
                   if (col instanceof ManageableCollection)
                   {
  @@ -2022,7 +2014,12 @@
        */
       public void removeFromCache(Object obj) throws PersistenceBrokerException
       {
  -        objectCache.remove(new Identity(obj, this));
  +    	// objects must also be remove from LoadedObjectsRegistry
  +    	// Fix by Jamie Burns
  +        Identity identity = new Identity(obj, this);
  +        Object objectToRemove = objectCache.lookup(identity);
  +        LoadedObjectsRegistry.remove(objectToRemove);
  +        objectCache.remove(identity);
       }
   
       /**
  @@ -2049,6 +2046,8 @@
        */
       public void clearCache() throws PersistenceBrokerException
       {
  +    	// fix by Jamie Burns
  +    	LoadedObjectsRegistry.clear();
           objectCache.clear();
       }
   
  
  
  

Mime
View raw message