开发者

JDBC Connection Pool [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years a开发者_运维问答go.

I have wriiten my connection pooling by extending connection and driver class. It is working fine but the problem is I want to now impose a upper limit and if te upper limit is reached then I want to store the request in the queue and return when any connections are free. How can I do this. Thanks in advance for replys


This is a bad, bad design.

Your pool should not require you to extend anything. It should not be concerned with requests, either. Just check connections in and out. Have another component manage a queue of requests and collaborate with your pool to get connections.

Connection pools have been done. The easiest one to maintain is the one that's written by someone else.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜