Java app handling for connections getting dropped
问题 My app seems to be hanging overnight because of the connection getting dropped(I think that's the problem.) How can I structure my app so that it can try to roll up a new connection? Since the incident I have updated the getConnection() method that my app uses as so: private Connection getConnection() { boolean failed = false; try{ failed = !connection.isValid(1000); }catch(SQLException ex){ System.out.println("WARNING: Connection not valid!"); } try{ failed = connection.isClosed(); }catch