0

a question just came to my mind when I noticed that I didn't close the connection to the database in many classes of my java application. I wonder if this can affect my entire OS as the time goes by. Thanks in advance.

Abdelaziz Dabebi
  • 1,624
  • 1
  • 16
  • 21

1 Answers1

0

To the Database, no. Depending on the driver and adaptor for your language, it will either automatically close itself after the request is complete or (most likely) just timeout after a while. It will continue to listen for your application's connection after the application has completed it's requests thus consuming more resources on the server until the DB decides it's time to end that connection.

SamT
  • 10,374
  • 2
  • 31
  • 39