cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkazimirc...@apache.org
Subject svn commit: r1153056 - in /cayenne/main/trunk: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/
Date Tue, 02 Aug 2011 07:37:12 GMT
Author: dkazimirchyk
Date: Tue Aug  2 07:37:10 2011
New Revision: 1153056

URL: http://svn.apache.org/viewvc?rev=1153056&view=rev
Log:
CAY-1594 DI extension point: turning on/off cross-ObjectContext synchronization

removed unnecessary api from ObjectStoreFactory

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/NoSyncObjectStore.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1153056&r1=1153055&r2=1153056&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Tue Aug  2 07:37:10 2011
@@ -27,6 +27,7 @@ CAY-1573 QueryLogger to DI JdbcEventLogg
 CAY-1584 Improve Cayenne modeler re-ordering named query in the cayenne map xml
 CAY-1586 New extension point: a strategy for retaining objects in the ObjectStore
 CAY-1590 DDL generation without a live datasource
+CAY-1594 DI extension point: turning on/off cross-ObjectContext synchronization
 
 Bug Fixes Since 3.1M2:
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/NoSyncObjectStore.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/NoSyncObjectStore.java?rev=1153056&r1=1153055&r2=1153056&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/NoSyncObjectStore.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/NoSyncObjectStore.java
Tue Aug  2 07:37:10 2011
@@ -36,18 +36,8 @@ public class NoSyncObjectStore extends O
     
     @Override
     public void setDataRowCache(DataRowStore dataRowCache) {
-        if (dataRowCache == this.dataRowCache) {
-            return;
-        }
-
-        if (this.dataRowCache != null && this.dataRowCache.getEventManager() != null)
{
-            this.dataRowCache.getEventManager().removeListener(
-                    this,
-                    this.dataRowCache.getSnapshotEventSubject());
-        }
 
         this.dataRowCache = dataRowCache;
-
         dataRowCacheSet = dataRowCache != null;
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java?rev=1153056&r1=1153055&r2=1153056&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/DefaultObjectStoreFactory.java
Tue Aug  2 07:37:10 2011
@@ -18,9 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.configuration;
 
-import java.util.Map;
-
-import org.apache.cayenne.Persistent;
 import org.apache.cayenne.access.DataRowStore;
 import org.apache.cayenne.access.NoSyncObjectStore;
 import org.apache.cayenne.access.ObjectMapRetainStrategy;
@@ -43,13 +40,9 @@ public class DefaultObjectStoreFactory i
     protected ObjectMapRetainStrategy retainStrategy;
     
     public ObjectStore createObjectStore(DataRowStore dataRowCache) {
-        return createObjectStore(dataRowCache, retainStrategy.createObjectMap());
-    }
-
-    public ObjectStore  createObjectStore(DataRowStore dataRowCache, Map<Object, Persistent>
objectMap) {
         boolean sync = runtimeProperties.getBoolean(SYNC_PROPERTY, true);
         
-        return sync ? new ObjectStore(dataRowCache, objectMap) 
-                : new NoSyncObjectStore(dataRowCache, objectMap);
+        return sync ? new ObjectStore(dataRowCache, retainStrategy.createObjectMap()) 
+                : new NoSyncObjectStore(dataRowCache, retainStrategy.createObjectMap());
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java?rev=1153056&r1=1153055&r2=1153056&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ObjectStoreFactory.java
Tue Aug  2 07:37:10 2011
@@ -18,9 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.configuration;
 
-import java.util.Map;
-
-import org.apache.cayenne.Persistent;
 import org.apache.cayenne.access.DataRowStore;
 import org.apache.cayenne.access.ObjectStore;
 
@@ -37,10 +34,5 @@ public interface ObjectStoreFactory {
      * Creates an {@link ObjectStore} with provided dataRowCache
      */
     ObjectStore createObjectStore(DataRowStore dataRowCache);
-    
-    /**
-     * Creates an {@link ObjectStore} with provided dataRowCache and objectMap
-     */
-    ObjectStore createObjectStore(DataRowStore dataRowCache, Map<Object, Persistent>
objectMap);
 
 }



Mime
View raw message