How to pool the connections of mongodb with casbah

2019-06-15 15:52发布

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条回答
放我归山
2楼-- · 2019-06-15 16:54

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.

查看更多
登录 后发表回答