Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connection problem

 
himanshu patel
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic