Manu Tayal wrote:
>
> Hi,
>   I have downloaded a the connection pool source code and I was trying to
> run an example servlet given along with it. The example servlet is executing
> perfectly. But the problem is that I have specified the maximum number of
> connections as 3. Now the servlet is establishing the connection to the
> database only thrice. The next time I try to run the servlet, it says
> connection failed. I cannot figure out the problem. Or is it the way the
> connection pool functions?
>
> Any help is appreciated.

You don't say which of the many connection pool implementations available
on the net that you're using, but a wild guess here is that you do not
return the connection to the pool when you're done with it.

All pools are intended to be used the same way:

1) You get a connection from the pool when you need it, typically
   in doGet/doPost,
2) You use it for a short time, typically just within the same
   method as where you got it,
3) You return it to the pool when you're done, typically just before
   returning from doGet/doPost.


--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to