I'm reading a code from the last developer that worked on the system and he never closes any connections with the database. He only closes PreparedStatement
and ResultSet
connections but never the Connection.
The system does not use a connection pool.
Is there any reason not to close everything (Connection
, PreparedStatement
and ResultSet
)?