From 66b18a01939df9d4adc00afec4d68107c39bdd27 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Wed, 28 Jan 2015 13:55:46 -0800 Subject: [PATCH] Even more reliability for SQL connections. --- src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java index 8650389..d507de3 100644 --- a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java @@ -505,6 +505,7 @@ public class DatabaseDataStore extends DataStore { GriefPrevention.AddLogEntry("Unable to retrieve data for player " + playerID.toString() + ". Details:"); GriefPrevention.AddLogEntry(e.getMessage()); + e.printStackTrace(); } return playerData; @@ -617,6 +618,8 @@ public class DatabaseDataStore extends DataStore Properties connectionProps = new Properties(); connectionProps.put("user", this.userName); connectionProps.put("password", this.password); + connectionProps.put("autoReconnect", "true"); + connectionProps.put("maxReconnects", "4"); //establish connection this.databaseConnection = DriverManager.getConnection(this.databaseUrl, connectionProps);