openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1458437 - /openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
Date Tue, 19 Mar 2013 17:59:05 GMT
Author: curtisr7
Date: Tue Mar 19 17:59:04 2013
New Revision: 1458437

URL: http://svn.apache.org/r1458437
Log:
OPENJPA-2353: Fix bug in BrokerImpl.initializeOperatingSet() initialization after deserialization.

Modified:
    openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java

Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?rev=1458437&r1=1458436&r2=1458437&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
(original)
+++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
Tue Mar 19 17:59:04 2013
@@ -196,8 +196,8 @@ public class BrokerImpl implements Broke
 
     // these are used for method-internal state only
     private transient Map<Object, StateManagerImpl> _loading = null;
-    private transient Set<Object> _operating = MapBackedSet.decorate(new IdentityHashMap<Object,
Object>());;
-    private transient boolean _operatingDirty = false;
+    private transient Set<Object> _operating = null;
+    private transient boolean _operatingDirty = true;
 
     private Set<Class<?>> _persistedClss = null;
     private Set<Class<?>> _updatedClss = null;
@@ -342,7 +342,10 @@ public class BrokerImpl implements Broke
         _log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
         if (!fromDeserialization)
             _cache = new ManagedCache(this);
+        // Force creation of a new operating set
+        _operatingDirty = true;
         initializeOperatingSet();
+        
         _connRetainMode = connMode;
         _managed = managed;
         if (managed)
@@ -4790,6 +4793,10 @@ public class BrokerImpl implements Broke
         // re-initialize the lock if needed.
         setMultithreaded(_multithreaded);
 
+        // force recreation of set
+        _operatingDirty = true;
+        initializeOperatingSet();
+
         if (isActive() && _runtime instanceof LocalManagedRuntime)
             ((LocalManagedRuntime) _runtime).begin();
     }
@@ -5241,8 +5248,9 @@ public class BrokerImpl implements Broke
        return Arrays.toString(result.toArray(new String[result.size()]));
     }
     
-    private boolean operatingAdd(Object o){
+    private boolean operatingAdd(Object o) {
         _operatingDirty = true;
         return _operating.add(o);
     }
+    
 }



Mime
View raw message