File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
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
Similar Threads
JSF Database Access
Servlet hang when performing to much insert function
Closed connnections not returning to pool
WAS 4 Connection Pool
Getting 2 phase commit exception with SQL server and DB2 datasources....