All pastes #33337 Raw Edit

Untitled

public text v1 · immutable
#33337 ·published 2005-12-12 01:40 UTC
rendered paste body
Index: C:/workspace/L2_GameServer/java/net/sf/l2j/L2DatabaseFactory.java
===================================================================
--- C:/workspace/L2_GameServer/java/net/sf/l2j/L2DatabaseFactory.java	(revision 1880)
+++ C:/workspace/L2_GameServer/java/net/sf/l2j/L2DatabaseFactory.java	(working copy)
@@ -46,14 +46,16 @@
                 _log.warning("at least " + Config.DATABASE_MAX_CONNECTIONS + " db connections are required.");
             }
 
-			PoolConfig config = new PoolConfig();
+			PoolConfig config = new PoolConfig(); 
 			config.setAutoCommitOnClose(true);
-			config.setInitialPoolSize(1);
-			config.setMinPoolSize(1);
+			config.setInitialPoolSize(2);
+			config.setMinPoolSize(2);
 			config.setMaxPoolSize(Config.DATABASE_MAX_CONNECTIONS);
 			config.setMaxStatements(100);
-			config.setIdleConnectionTestPeriod(0); // test idle connection every 1 minute
-			config.setMaxIdleTime(0); // remove unused connection after 10 minutes
+			config.setIdleConnectionTestPeriod(60); // test idle connection every 1 minute
+			config.setMaxIdleTime(600); // remove unused connection after 10 minutes
+			config.setNumHelperThreads(10);
+			config.setAcquireIncrement(5);
 
 			Class.forName(Config.DATABASE_DRIVER).newInstance();