Refactored DatabaseFactory.
This commit is contained in:
@@ -34,7 +34,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.l2jmobius.commons.database.pool.impl.ConnectionFactory;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ItemLocation;
|
||||
import com.l2jmobius.gameserver.enums.MailType;
|
||||
@@ -79,7 +79,7 @@ public final class CommissionManager
|
||||
protected CommissionManager()
|
||||
{
|
||||
final Map<Integer, L2ItemInstance> itemInstances = new HashMap<>();
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection())
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection())
|
||||
{
|
||||
try (PreparedStatement ps = con.prepareStatement(SELECT_ALL_ITEMS))
|
||||
{
|
||||
@@ -253,7 +253,7 @@ public final class CommissionManager
|
||||
return;
|
||||
}
|
||||
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(INSERT_COMMISSION_ITEM, Statement.RETURN_GENERATED_KEYS))
|
||||
{
|
||||
final Instant startTime = Instant.now();
|
||||
@@ -406,7 +406,7 @@ public final class CommissionManager
|
||||
*/
|
||||
private boolean deleteItemFromDB(long commissionId)
|
||||
{
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement(DELETE_COMMISSION_ITEM))
|
||||
{
|
||||
ps.setLong(1, commissionId);
|
||||
|
Reference in New Issue
Block a user