开发者

JDBC Connection Pool [closed]

开发者 https://www.devze.com 2023-04-04 06:42 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
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

精彩评论

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