Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OracleDataSource.close() and the servlet destroy() method

596844Jan 2 2008 — edited Nov 20 2014
I could never get an answer about the importance of the OracleDataSource.close() method, so I assumed that it was a good idea to use it in my servlets. I thought I would be clever and put it in the servlet destroy() methods of our application.

This worked well in Tomcat, but failed in WebLogic. In the WebLogic I would get errors saying that the connection was already closed by OracleDataSource.close() when I tried to use a connection. This might have something to do with the way WebLogic loads and unloads servlets.

Anyway I "solved" the problem by removing the close. Is this OK?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2008
Added on Jan 2 2008
4 comments
2,754 views