pool connection

105 views
Skip to first unread message

fate...@gmail.com

unread,
Aug 1, 2013, 11:21:11 AM8/1/13
to jongo...@googlegroups.com
hi,

I would like to use a connection pool to improve performance, I want to use threads in Java with a different connection for each, please.

Thanks

fate...@gmail.com

unread,
Aug 2, 2013, 5:17:13 AM8/2/13
to jongo...@googlegroups.com
hi,

how to get a connection pool with jongo like this:


MongoOptions options = new MongoOptions();
options.connectionsPerHost = 10;
   options.maxWaitTime = 2000;
   options.socketKeepAlive = true;
   options.threadsAllowedToBlockForConnectionMultiplier = 10;
   db.requestStart();   

thanks

Benoît GUEROUT

unread,
Aug 23, 2013, 6:03:33 AM8/23/13
to jongo...@googlegroups.com
You can use MongoClientOptions builder to create a MongoClientOptions instance and then create a MongoClient as follow : 

MongoClient client = new MongoClient(host, options);
Jongo jongo = new Jongo(client.getDB(''mydb));


--
You received this message because you are subscribed to the Google Groups "Jongo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jongo-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

郑露

unread,
May 5, 2016, 7:19:55 AM5/5/16
to Jongo
how can i configurate with xml

在 2013年8月23日星期五 UTC+8下午6:03:33,Benoît GUEROUT写道:
Reply all
Reply to author
Forward
0 new messages