I have a java web server with a lot of methods querying each my mysql database through JDBC. At the end of each method called, the Statement and the Resultset are automatically closed. Nevertheless, I am never closing the Connection since the whole application is using the very same connection to the database.
Here is thus my questions :
Am I doing good regarding the connection or should I create and close a connection in each method (meaning almost after each query) ?
In case I create a connection for each method, won't this be really expensive for my server low ressources ?
PS : None of the already asked questions on JDBC that I found was tackling this issue.