Dropped c3p0 in favor of HikariCP.
This commit is contained in:
@@ -842,7 +842,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
|
||||
|
||||
private static void updateAttacker(int clanId, long count, boolean remove)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
PreparedStatement statement;
|
||||
if (remove)
|
||||
@@ -868,7 +868,7 @@ public final class RainbowSpringsChateau extends ClanHallSiegeEngine
|
||||
@Override
|
||||
public void loadAttackers()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement("SELECT * FROM rainbowsprings_attacker_list");
|
||||
final ResultSet rset = statement.executeQuery();
|
||||
|
@@ -762,7 +762,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
|
||||
@Override
|
||||
public final void loadAttackers()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement(SQL_LOAD_ATTACKERS);
|
||||
statement.setInt(1, _hall.getId());
|
||||
@@ -796,7 +796,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
|
||||
|
||||
private final void loadAttackerMembers(int clanId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final ArrayList<Integer> listInstance = _data.get(clanId).players;
|
||||
|
||||
@@ -826,7 +826,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
|
||||
|
||||
private final void saveClan(int clanId, int flag)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement(SQL_SAVE_CLAN);
|
||||
statement.setInt(1, _hall.getId());
|
||||
@@ -845,7 +845,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
|
||||
|
||||
private final void saveNpc(int npc, int clanId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement(SQL_SAVE_NPC);
|
||||
statement.setInt(1, npc);
|
||||
@@ -862,7 +862,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
|
||||
|
||||
private final void saveMember(int clanId, int objectId)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement(SQL_SAVE_ATTACKER);
|
||||
statement.setInt(1, _hall.getId());
|
||||
@@ -880,7 +880,7 @@ public abstract class FlagWar extends ClanHallSiegeEngine
|
||||
|
||||
private void clearTables()
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement stat1 = con.prepareStatement(SQL_CLEAR_CLAN);
|
||||
stat1.setInt(1, _hall.getId());
|
||||
|
@@ -76,7 +76,7 @@ public final class AdminChangeAccessLevel implements IAdminCommandHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement("UPDATE characters SET accesslevel=? WHERE char_name=?");
|
||||
statement.setInt(1, lvl);
|
||||
|
@@ -623,7 +623,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
|
||||
if (player == null)
|
||||
{
|
||||
final Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
final Connection con = DatabaseFactory.getConnection();
|
||||
final PreparedStatement ps = con.prepareStatement("UPDATE characters SET " + (changeCreateExpiryTime ? "clan_create_expiry_time" : "clan_join_expiry_time") + " WHERE char_name=? LIMIT 1");
|
||||
|
||||
ps.setString(1, playerName);
|
||||
|
@@ -62,7 +62,7 @@ public class AdminRepairChar implements IAdminCommandHandler
|
||||
}
|
||||
|
||||
final String cmd = "UPDATE characters SET x=-84318, y=244579, z=-3730 WHERE char_name=?";
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
PreparedStatement statement = con.prepareStatement(cmd);
|
||||
statement.setString(1, parts[1]);
|
||||
@@ -87,13 +87,13 @@ public class AdminRepairChar implements IAdminCommandHandler
|
||||
return;
|
||||
}
|
||||
|
||||
// connection = DatabaseFactory.getInstance().getConnection();
|
||||
// connection = DatabaseFactory.getConnection();
|
||||
statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE charId=?");
|
||||
statement.setInt(1, objId);
|
||||
statement.execute();
|
||||
statement.close();
|
||||
|
||||
// connection = DatabaseFactory.getInstance().getConnection();
|
||||
// connection = DatabaseFactory.getConnection();
|
||||
statement = con.prepareStatement("UPDATE items SET loc=\"INVENTORY\" WHERE owner_id=?");
|
||||
statement.setInt(1, objId);
|
||||
statement.execute();
|
||||
|
@@ -172,7 +172,7 @@ public class AdminShowQuests implements IAdminCommandHandler
|
||||
|
||||
private static void showQuestMenu(L2PcInstance target, L2PcInstance actor, String[] val)
|
||||
{
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
ResultSet rs;
|
||||
PreparedStatement req;
|
||||
|
@@ -499,7 +499,7 @@ public class AdminTeleport implements IAdminCommandHandler
|
||||
final int x = activeChar.getX();
|
||||
final int y = activeChar.getY();
|
||||
final int z = activeChar.getZ();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement("UPDATE characters SET x=?, y=?, z=? WHERE char_name=?");
|
||||
statement.setInt(1, x);
|
||||
|
@@ -61,7 +61,7 @@ public class FavoriteBoard implements IParseBoardHandler
|
||||
// Load Favorite links
|
||||
final String list = HtmCache.getInstance().getHtm(activeChar, "data/html/CommunityBoard/favorite_list.html");
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(SELECT_FAVORITES))
|
||||
{
|
||||
ps.setInt(1, activeChar.getObjectId());
|
||||
@@ -98,7 +98,7 @@ public class FavoriteBoard implements IParseBoardHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(ADD_FAVORITE))
|
||||
{
|
||||
ps.setInt(1, activeChar.getObjectId());
|
||||
@@ -123,7 +123,7 @@ public class FavoriteBoard implements IParseBoardHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(DELETE_FAVORITE))
|
||||
{
|
||||
ps.setInt(1, activeChar.getObjectId());
|
||||
|
@@ -292,7 +292,7 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
private static int getFavoriteCount(L2PcInstance player)
|
||||
{
|
||||
int count = 0;
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(COUNT_FAVORITES))
|
||||
{
|
||||
ps.setInt(1, player.getObjectId());
|
||||
|
@@ -62,7 +62,7 @@ public class ClanWarsList implements IUserCommandHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
String query;
|
||||
// Attack List
|
||||
|
@@ -211,7 +211,7 @@ public class Wedding implements IVoicedCommandHandler
|
||||
// check if target has player on friendlist
|
||||
boolean FoundOnFriendList = false;
|
||||
int objectId;
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getConnection())
|
||||
{
|
||||
final PreparedStatement statement = con.prepareStatement("SELECT friendId FROM character_friends WHERE charId=?");
|
||||
statement.setInt(1, ptarget.getObjectId());
|
||||
|
@@ -1 +1 @@
|
||||
-server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jmobius.log.L2LogManager -XX:+AggressiveOpts -Xnoclassgc -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -Xmx4g -Xms2g -Xmn1g
|
||||
-server -Dfile.encoding=UTF-8 -Djava.util.logging.manager=com.l2jmobius.log.L2LogManager -Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=error -XX:+AggressiveOpts -Xnoclassgc -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=8 -Xmx4g -Xms2g -Xmn1g
|
BIN
L2J_Mobius_CT_2.6_HighFive/dist/libs/HikariCP-3.2.0.jar
vendored
Normal file
BIN
L2J_Mobius_CT_2.6_HighFive/dist/libs/HikariCP-3.2.0.jar
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
L2J_Mobius_CT_2.6_HighFive/dist/libs/slf4j-api-1.7.25.jar
vendored
Normal file
BIN
L2J_Mobius_CT_2.6_HighFive/dist/libs/slf4j-api-1.7.25.jar
vendored
Normal file
Binary file not shown.
BIN
L2J_Mobius_CT_2.6_HighFive/dist/libs/slf4j-simple-1.7.25.jar
vendored
Normal file
BIN
L2J_Mobius_CT_2.6_HighFive/dist/libs/slf4j-simple-1.7.25.jar
vendored
Normal file
Binary file not shown.
@@ -1 +1 @@
|
||||
-server -Xms128m -Xmx256m
|
||||
-server -Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=error -Xms128m -Xmx256m
|
Reference in New Issue
Block a user