Catch them and reconnect? If a connection dies, the application will throw an exception after some timeout value. You can catch these exceptions and decide a recovery path. You could also set up a polling thread to monitor the database status although this might be overkill.