database connection are not getting closed
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   chandan_mahajan
Posted On:   Wednesday, March 21, 2007 05:56 AM


			
I have my project in JSP,Servlet and we are using tomcat 4.4.1 version as server.
There is one button on jsp , if we click on that button, I make database connection using connection pooling and execute some code.
But if I click continuesly on that button say 1 minute and see to enterprizemanager for connection to my database,
connection will be above 50 and it goes on increasing further.
So anybody can tell me what could be the problem.where it is problem of tomcat or connection pooling.

Re: database connection are not getting closed

Posted By:   Joost_Schouten  
Posted On:   Wednesday, March 21, 2007 06:11 PM

do you call connection.close()? Make sure you call it from a finally block so that when an exception is thrown your connection is still closed. If you want a more detailed answer, post the code of your servlet here.


Cheers,
Joost

About | Sitemap | Contact