DBCP:removeAbandoned VS 驱逐
我无法弄清楚removeAbandoned和驱逐之间的区别。我在某处读到,removeAbandoned 已被弃用,但官方文档中没有提及(http:// commons.apache.org/dbcp/configuration.html)。
因此,如果有人能启发我,我将不胜感激:)
谢谢!
I fail to figure out the difference between removeAbandoned and eviction. I read somewhere that removeAbandoned was deprecated, but it is not mentionned anywhere in the official doc (http://commons.apache.org/dbcp/configuration.html).
So, if someone could enlighten me, it would be greatly appreciated :)
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它们意味着不同的事情:
驱逐并不表明您的代码有问题(只是应用程序在连接爆发后需要更少的连接)但是放弃的连接意味着应用程序正在保留连接并且不会返回到池中。
They mean different things:
Eviction does not indicate a problem with your code (it's just that the application needs fewer connections after a burst of connections) but abandoned connections means that the application is holding on to a connection and is not returning to the pool.