Connection pooling pattern

折月煮酒 提交于 2019-12-24 10:40:11

问题


How can I implement a connection pooling in Java?

There is some pattern?

I should use some connections and release it. This connection should be closed after a few times.


回答1:


You can use some libraries. For JDBC connection pooling check out bonecp, c3p0 or dbcp. If you need a general purpose pooling, see commons Pool, which dbcp is built on.



来源:https://stackoverflow.com/questions/12640608/connection-pooling-pattern

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