开发者

Lift connection pool?

I'm just getting into the lift framework, and I'm curious as to how the default non-jndi path works w开发者_StackOverflowith respect to connections. All of the docs and examples I've seen recommend using a pattern that directly calls DriverManager.getConnection to obtain DB connections. Having come from several years of java/spring developement, this of course gives me The Willies.

My question is thus - should I plug in something like c3p0 or dbcp in my DBVendor implementation? Or does the lift DB object do it's own connection pooling? I've done some reading through the lift codebase, and it appears that it might not be actually caching connections.


By the looks of it, Lift's ProtoDBVendor, which the StandardDBVendor extends keeps the connections in a list. If you use this implementation you're getting the connection pooling provided by Lift, therefore. If you're not happy with that, you can provide your implementation of the ConnectionManager trait, and provide implementations of the newConnection and releaseConnection methods using your preferred connection pool.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜