Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-03-02 06:04:12 +0000
committerEike Stepper2011-03-02 06:04:12 +0000
commitdd48eb0839e48f3759fc0e11d5e85ed51d2faf60 (patch)
treeb3956c881022efcad5f08d19243af2e4334b54db /plugins/org.eclipse.emf.cdo.server.mongodb
parentc85966659be299aea06fa40319acaf75658fe3d3 (diff)
downloadcdo-dd48eb0839e48f3759fc0e11d5e85ed51d2faf60.tar.gz
cdo-dd48eb0839e48f3759fc0e11d5e85ed51d2faf60.tar.xz
cdo-dd48eb0839e48f3759fc0e11d5e85ed51d2faf60.zip
[337805] Repo config logic broken when supportingAudits/Branches props missing
https://bugs.eclipse.org/bugs/show_bug.cgi?id=337805
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.mongodb')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Coll.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStoreFactory.java5
2 files changed, 9 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Coll.java b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Coll.java
index 94fa1ae99c..256565cf46 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Coll.java
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/Coll.java
@@ -66,27 +66,27 @@ public class Coll
public abstract class Query<RESULT>
{
private DBObject ref;
-
+
public Query(DBObject ref)
{
this.ref = ref;
}
-
+
public DBObject getRef()
{
return ref;
}
-
+
public RESULT execute()
{
return execute(collection.find(ref));
}
-
+
public RESULT execute(DBObject keys)
{
return execute(collection.find(ref, keys));
}
-
+
protected RESULT execute(DBCursor cursor)
{
try
@@ -100,7 +100,7 @@ public class Coll
return result;
}
}
-
+
return null;
}
finally
@@ -108,7 +108,7 @@ public class Coll
cursor.close();
}
}
-
+
protected abstract RESULT handleDoc(DBObject doc);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStoreFactory.java b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStoreFactory.java
index e26cd06d01..c90c5a2cd2 100644
--- a/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStoreFactory.java
+++ b/plugins/org.eclipse.emf.cdo.server.mongodb/src/org/eclipse/emf/cdo/server/internal/mongodb/MongoDBStoreFactory.java
@@ -13,7 +13,6 @@ package org.eclipse.emf.cdo.server.internal.mongodb;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.server.IStoreFactory;
import org.eclipse.emf.cdo.server.mongodb.CDOMongoDBUtil;
-import org.eclipse.emf.cdo.spi.server.InternalRepository;
import org.eclipse.emf.cdo.spi.server.RepositoryConfigurator;
import org.eclipse.net4j.util.StringUtil;
@@ -41,7 +40,7 @@ public class MongoDBStoreFactory implements IStoreFactory
return MongoDBStore.TYPE;
}
- public IStore createStore(InternalRepository repository, Element storeConfig)
+ public IStore createStore(String repositoryName, Map<String, String> repositoryProperties, Element storeConfig)
{
Map<String, String> properties = RepositoryConfigurator.getProperties(storeConfig, 1);
String uri = properties.get("uri");
@@ -54,7 +53,7 @@ public class MongoDBStoreFactory implements IStoreFactory
String dbName = properties.get("db");
if (StringUtil.isEmpty(dbName))
{
- dbName = repository.getName();
+ dbName = repositoryName;
}
String drop = properties.get("drop");

Back to the top