MongoServices.getClient

Returns an instance of MongoClient representing a connection to the MongoDB database. Only one client instance is maintained and this is shared by all users.

Javascript example:

 var client = services.database.mongo.getClient("MongoDB");
 var database = client.getDatabase("restaurants");
 var collection = database.getCollection("restaurant");
 
Further documentation.

returns com.mongodb.client.MongoClient

Parameters

java.lang.String  databaseConnectionName,