You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2016/09/12 01:16:11 UTC
[7/8] zest-java git commit: Upgrade MongoDB Java Driver from 2.x to
3.3.0
Upgrade MongoDB Java Driver from 2.x to 3.3.0
See http://mongodb.github.io/mongo-java-driver/3.0/whats-new/upgrading/
Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/9f946d90
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/9f946d90
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/9f946d90
Branch: refs/heads/develop
Commit: 9f946d9009b088895dc102f011307ce872a0ea32
Parents: 4d8704f
Author: Paul Merlin <pa...@apache.org>
Authored: Sun Sep 11 15:34:00 2016 -0700
Committer: Paul Merlin <pa...@apache.org>
Committed: Sun Sep 11 15:34:00 2016 -0700
----------------------------------------------------------------------
.../entitystore/mongodb/MongoMapEntityStoreMixin.java | 13 -------------
libraries.gradle | 2 +-
2 files changed, 1 insertion(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zest-java/blob/9f946d90/extensions/entitystore-mongodb/src/main/java/org/apache/zest/entitystore/mongodb/MongoMapEntityStoreMixin.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/src/main/java/org/apache/zest/entitystore/mongodb/MongoMapEntityStoreMixin.java b/extensions/entitystore-mongodb/src/main/java/org/apache/zest/entitystore/mongodb/MongoMapEntityStoreMixin.java
index 9417d10..9786586 100644
--- a/extensions/entitystore-mongodb/src/main/java/org/apache/zest/entitystore/mongodb/MongoMapEntityStoreMixin.java
+++ b/extensions/entitystore-mongodb/src/main/java/org/apache/zest/entitystore/mongodb/MongoMapEntityStoreMixin.java
@@ -91,13 +91,11 @@ public class MongoMapEntityStoreMixin
db = mongo.getDB( databaseName );
// Create index if needed
- db.requestStart();
DBCollection entities = db.getCollection( collectionName );
if( entities.getIndexInfo().isEmpty() )
{
entities.createIndex( new BasicDBObject( IDENTITY_COLUMN, 1 ) );
}
- db.requestDone();
}
private void loadConfiguration()
@@ -203,8 +201,6 @@ public class MongoMapEntityStoreMixin
public Reader get( EntityReference entityReference )
throws EntityStoreException
{
- db.requestStart();
-
DBObject entity = db.getCollection( collectionName ).findOne( byIdentity( entityReference ) );
if( entity == null )
{
@@ -212,8 +208,6 @@ public class MongoMapEntityStoreMixin
}
DBObject bsonState = (DBObject) entity.get( STATE_COLUMN );
- db.requestDone();
-
String jsonState = JSON.serialize( bsonState );
return new StringReader( jsonState );
}
@@ -222,7 +216,6 @@ public class MongoMapEntityStoreMixin
public void applyChanges( MapChanges changes )
throws IOException
{
- db.requestStart();
final DBCollection entities = db.getCollection( collectionName );
changes.visitMap( new MapChanger()
@@ -284,8 +277,6 @@ public class MongoMapEntityStoreMixin
entities.remove( entity, writeConcern );
}
} );
-
- db.requestDone();
}
@Override
@@ -305,8 +296,6 @@ public class MongoMapEntityStoreMixin
Receiver<? super Reader, ReceiverThrowableType> receiver )
throws ReceiverThrowableType, IOException
{
- db.requestStart();
-
DBCursor cursor = db.getCollection( collectionName ).find();
while( cursor.hasNext() )
{
@@ -315,8 +304,6 @@ public class MongoMapEntityStoreMixin
String jsonState = JSON.serialize( bsonState );
receiver.receive( new StringReader( jsonState ) );
}
-
- db.requestDone();
}
} );
}
http://git-wip-us.apache.org/repos/asf/zest-java/blob/9f946d90/libraries.gradle
----------------------------------------------------------------------
diff --git a/libraries.gradle b/libraries.gradle
index 514ea3c..757236e 100644
--- a/libraries.gradle
+++ b/libraries.gradle
@@ -48,7 +48,7 @@ def leveldbVersion = '0.9'
def leveldbJniVersion = '1.8'
def liquibaseVersion = '3.5.1'
def logbackVersion = '1.1.7'
-def mongodbVersion = '2.14.3' // 3.3.x Fails to compile!
+def mongodbVersion = '3.3.0'
def mysqlVersion = '5.1.39' // 6.x exists
def orgJsonVersion = '20130213'
def osgiVersion = '4.2.0' // 4.3.0 Fails to compile! - 5.0.0 exists