Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ public synchronized Connection getConnection() {
log.info("The database connection is invalid. Reconnecting...");
close();
newConnection();
} else {
log.debug("Using existing database connection.");
}
} catch (SQLException sqle) {
log.debug("Could not establish connection with database.", sqle);
throw new ConnectException(sqle);
}
log.debug("Database connection established.");
return connection;
}

Expand All @@ -82,6 +83,7 @@ private void newConnection() throws SQLException {
++count;
log.debug("Attempting to open connection #{} to {}", count, provider);
connection = provider.getConnection();
log.info("Database connection established.");
onConnect(connection);
return;
} catch (SQLException sqle) {
Expand Down