Even more reliability for SQL connections.

This commit is contained in:
ryanhamshire 2015-01-28 13:55:46 -08:00
parent 8f566ce816
commit 66b18a0193

View File

@ -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);