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!

Opening/closing connection, or leaving open?

843854Apr 12 2004 — edited Apr 14 2004
Say I have 500 people using a program that retrieves/stores info in a mySQL database.

Now, my dilema is:
1) Open a connection to the db when the program starts and close the connection when the program exits.
2) Open a connection when a user needs to send/retrieve data and close it afterwards

Which one would be best?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 12 2004
Added on Apr 12 2004
4 comments
319 views