How to pool the connections of mongodb with casbah?

筅森魡賤 提交于 2019-12-08 15:27:23

问题


I'm using mongodb with scala driver casbah. If I'm not understanding wrong, it doesn't provide connection pool. Is there any pool libraries for casbah, like dbcp/c3p0 for jdbc connections?


回答1:


Casbah wraps the MongoDB Java Driver which provides a connection pool. An Instance of MongoConnection is actually an instance of the pool, not an individual connection. The pool can be tuned with an instance of the MongoOptions class passed to a new MongoConnection.



来源:https://stackoverflow.com/questions/5359456/how-to-pool-the-connections-of-mongodb-with-casbah

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!