gmongo

Mongo CursorNotFound exception in active cursor via Grails domain criteria

江枫思渺然 提交于 2020-01-02 02:11:09
问题 I'm using Grails 2.4.4, mongo plugin 3.0.2, MongoDB 2.4.10 using a remote database connection. grails { mongo { host = "11.12.13.14" // A remote server IP port = 27017 databaseName = "blogger" username = "blog" password = "xyz" options { autoConnectRetry = true connectTimeout = 3000 connectionsPerHost = 40 socketTimeout = 120000 threadsAllowedToBlockForConnectionMultiplier = 5 maxAutoConnectRetryTime=5 maxWaitTime=120000 } } } In a part of our application, a service method iterates over a 20

Create a mongo connection and make it alive for execution of an Entire Test Suite in Ready!API

旧时模样 提交于 2019-12-12 09:47:42
问题 If you want to make an gmongo connection alive for an entire test suite and then close it in a tear down operation after the entire test suite is executed then, How could we do that? Currently what am I doing is, I am creating an connection for an particular test step and then after the test step is executed, I close the connection by using the code mongoClient.close() But now there is a requirement where I need to create the connection before the test suite starts executing, use the same

Aggregations in gmongo 0.9.1

风流意气都作罢 提交于 2019-12-12 05:18:26
问题 I need to implement some simple aggregations in my app powered by Grails 1.3.7. The mongodb-plugin of 1.0.0.RC3 ships with gmongo 0.9.1, where the aggregate functions are not implemented. How can I solve the problem? Are there any hooks to call java-mongo API directly, or maybe there's some other plugin releases which allow aggregations? TIA 回答1: It seems that Mongo aggregation apis exist since 2.1 here, probably you might need to upgrade your libraries. Here is the mongodb plugin

Create a mongo connection and make it alive for execution of an Entire Test Suite in Ready!API

被刻印的时光 ゝ 提交于 2019-12-06 03:40:20
If you want to make an gmongo connection alive for an entire test suite and then close it in a tear down operation after the entire test suite is executed then, How could we do that? Currently what am I doing is, I am creating an connection for an particular test step and then after the test step is executed, I close the connection by using the code mongoClient.close() But now there is a requirement where I need to create the connection before the test suite starts executing, use the same connection throughout the test suite inside the test cases/test steps and then close the connection the

Mongo CursorNotFound exception in active cursor via Grails domain criteria

被刻印的时光 ゝ 提交于 2019-12-05 02:58:24
I'm using Grails 2.4.4, mongo plugin 3.0.2, MongoDB 2.4.10 using a remote database connection. grails { mongo { host = "11.12.13.14" // A remote server IP port = 27017 databaseName = "blogger" username = "blog" password = "xyz" options { autoConnectRetry = true connectTimeout = 3000 connectionsPerHost = 40 socketTimeout = 120000 threadsAllowedToBlockForConnectionMultiplier = 5 maxAutoConnectRetryTime=5 maxWaitTime=120000 } } } In a part of our application, a service method iterates over a 20,000 user's and sends them an email: Person.withCriteria { // Line 323 eq("active", true) order(