Skip to Main Content

ODP.NET

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!

Why Dispose() Each Time if I Need Connection Pooling

user12131557Feb 12 2015 — edited Feb 13 2015

Oracle and many internet posts suggest as the best practice, we should always call close() and dispose() after each database call. My question is if I dispose the connection, which cause the connection to be removed from the pool, with each use, the pooling service have to open a new connection every time when a connection is needed because all used connections are already disposed. This practice seems to contradict the purpose of connection pooling, and results in no pooling. Am I right?

Thanks,

Gary

This post has been answered by Alex Keh-Oracle on Feb 13 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2015
Added on Feb 12 2015
6 comments
2,190 views