This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Connection problem in DB2, Urgent please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Connection problem in DB2, Urgent please" Watch "Connection problem in DB2, Urgent please" New topic

Connection problem in DB2, Urgent please

Reddy B.K

Joined: Mar 10, 2003
Posts: 5
Thanks in Advance
I am using JSP with Universal DB2,The problem is even though i am closing the connection(Eg. if (conn!=null) conn.close() in Finally block of my servlet, some connections are still in the open mode, can any one have the way to close the connections.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Do you mean try{}catch{}finally{} or are you using finalize? If the former, write to a log each time you close a connection and check the connection with isClosed().
Are you using connection pooling? That will keep the real DB connections open.

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: Connection problem in DB2, Urgent please
It's not a secret anymore!