Fix hikari

This commit is contained in:
Gabriele C 2015-09-10 19:56:33 +02:00
parent 639a0482c2
commit d4cf739081
5 changed files with 4 additions and 29 deletions

View File

@ -7,7 +7,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.OutputStream; import java.io.OutputStream;
import java.lang.reflect.InvocationTargetException;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.sql.SQLException; import java.sql.SQLException;

View File

@ -124,7 +124,6 @@ public class MySQL implements DataSource {
HikariConfig config = new HikariConfig(); HikariConfig config = new HikariConfig();
config.setPoolName("AuthMeMYSQLPool"); config.setPoolName("AuthMeMYSQLPool");
config.setDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"); config.setDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource");
config.setDriverClassName("com.mysql.jdbc.Driver");
config.setJdbcUrl("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database); config.setJdbcUrl("jdbc:mysql://" + this.host + ":" + this.port + "/" + this.database);
config.setUsername(this.username); config.setUsername(this.username);
config.setPassword(this.password); config.setPassword(this.password);

View File

@ -115,14 +115,13 @@ public class SQLite_HIKARI implements DataSource {
@Override @Override
public DataSourceType getType() { public DataSourceType getType() {
return DataSourceType.SQLITE; return DataSourceType.SQLITEHIKARI;
} }
private synchronized void setConnectionArguments() private synchronized void setConnectionArguments()
throws ClassNotFoundException, IllegalArgumentException { throws ClassNotFoundException, IllegalArgumentException {
HikariConfig config = new HikariConfig(); HikariConfig config = new HikariConfig();
config.setPoolName("AuthMeSQLitePool"); config.setPoolName("AuthMeSQLitePool");
config.setDriverClassName("org.sqlite.JDBC");
config.setDataSourceClassName("org.sqlite.javax.SQLiteConnectionPoolDataSource"); config.setDataSourceClassName("org.sqlite.javax.SQLiteConnectionPoolDataSource");
config.setJdbcUrl("jdbc:sqlite:plugins/AuthMe/" + database + ".db"); config.setJdbcUrl("jdbc:sqlite:plugins/AuthMe/" + database + ".db");
config.setInitializationFailFast(true); // Don't start the plugin if the database is unavariable config.setInitializationFailFast(true); // Don't start the plugin if the database is unavariable

View File

@ -3,10 +3,8 @@ package fr.xephi.authme.listener;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.PatternSyntaxException; import java.util.regex.PatternSyntaxException;

View File

@ -39,26 +39,6 @@ DataSource:
mySQLlastlocWorld: world mySQLlastlocWorld: world
# Column for RealName # Column for RealName
mySQLRealName: realname mySQLRealName: realname
GroupOptions:
# if you want to set up a particulary Permission Group for
# users that arent registered yet. Pay attention this option
# is casesensitive!
# Example: UnregisteredPlayerGroup: GuestUser
UnregisteredPlayerGroup: ''
# Same as UnregisteredGroup if u want to set a switch
# between unregistered and registered player group
# set the group name below
RegisteredPlayerGroup: ''
# with this option you can add specified permission onJoin
# like for example LoginBonus from another plugins, AuthMe
# will check onJoin if player has that permissions in his Group
# if true it add a temporany permissions to that user. This Field
# is needed beacuse AuthMe switch all unlogged players on a
# specified restricted Permission Group, so plugins that will use
# some particolary permissions on join doesnt work, without
# compiling option below!
Permissions:
PermissionsOnJoin: []
settings: settings:
sessions: sessions:
# Do you want to enable session? When enabled # Do you want to enable session? When enabled
@ -290,10 +270,10 @@ ExternalBoardOptions:
# WordPress prefix defined during WordPress installation process # WordPress prefix defined during WordPress installation process
wordpressTablePrefix: 'wp_' wordpressTablePrefix: 'wp_'
permission: permission:
# take care with this options, if u dont want # Take care with this options, if you dont want
# to use Vault and Group Switching of # to use Vault and Group Switching of
# AuthMe for unloggedIn players put False # AuthMe for unloggedIn players put true
# below, default is true. # below, default is false.
EnablePermissionCheck: false EnablePermissionCheck: false
BackupSystem: BackupSystem:
# Enable or Disable Automatic Backup # Enable or Disable Automatic Backup