aspose file tools*
The moose likes JDBC and the fly likes JDBC Connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC Connection problem" Watch "JDBC Connection problem" New topic
Author

JDBC Connection problem

himanshu patel
Ranch Hand

Joined: Feb 03, 2003
Posts: 205
Hello Everybody,
I am getting one problem in J2EE application.
I am using Oracle OC4j.
I have hundreds of method which opens Connection (JDBC) object and explicitly closes at the end of method inside finally {} block. It works fine for almost all methods. But for some method I am getting following errors messages.
……
DriverManagerConnection PoolConnection not closed, check your code!
(Use -Djdbc.connection.debug=true to find out where the leaked connection was created)
……..
Despite of this error, the method works as expected. I do not understand why this happens when
I am releasing connection object at the end of every method inside finally {} block. And to my surprise I am getting this error only for 1-2 methods. I have used same Connection Handling mechanism for all methods.
Could anyone help me to sort out this problem.
Any suggestion is highly appreciated.
Thanks
Himanshu


If you want to become a rich, do not work for others but make others to work for you.
 
wood burning stoves
 
subject: JDBC Connection problem