Dropped c3p0 in favor of HikariCP.

This commit is contained in:
MobiusDev
2018-09-08 19:27:23 +00:00
parent 6fd681adcf
commit eb3742d44f
1149 changed files with 3883 additions and 4317 deletions

View File

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

View File

@@ -631,7 +631,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);

View File

@@ -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 = L2DatabaseFactory.getInstance().getConnection();
// connection = L2DatabaseFactory.getConnection();
statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE charId=?");
statement.setInt(1, objId);
statement.execute();
statement.close();
// connection = L2DatabaseFactory.getInstance().getConnection();
// connection = L2DatabaseFactory.getConnection();
statement = con.prepareStatement("UPDATE items SET loc=\"INVENTORY\" WHERE owner_id=?");
statement.setInt(1, objId);
statement.execute();

View File

@@ -173,7 +173,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;

View File

@@ -489,7 +489,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);

View File

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

View File

@@ -300,7 +300,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());

View File

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

View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
-server -Xms128m -Xmx256m
-server -Dorg.slf4j.simpleLogger.log.com.zaxxer.hikari=error -Xms128m -Xmx256m