pool.Initialize("com.mysql.jdbc.Driver", "jdbc:mysql://xxx.xxx.xxx.xxx/PRD_xxxxxxxxxxxxxxxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull", login, password)
pool.MaxLifetime = 1800000
Dim jocp As JavaObject = pool
jocp.RunMethod("setMaximumPoolSize", Array(poolSize))
jocp.RunMethod("addDataSourceProperty", Array("cachePrepStmts", True))
jocp.RunMethod("addDataSourceProperty", Array("prepStmtCacheSize", 250))
jocp.RunMethod("addDataSourceProperty", Array("prepStmtCacheSqlLimit", 2048))
jocp.RunMethod("addDataSourceProperty", Array("useServerPrepStmts", True))
jocp.RunMethod("addDataSourceProperty", Array("useLocalSessionState", True))
jocp.RunMethod("addDataSourceProperty", Array("useLocalTransactionState", True))
jocp.RunMethod("addDataSourceProperty", Array("rewriteBatchedStatements", True))
jocp.RunMethod("addDataSourceProperty", Array("cacheResultSetMetadata", True))
jocp.RunMethod("addDataSourceProperty", Array("cacheServerConfiguration", True))
jocp.RunMethod("addDataSourceProperty", Array("elideSetAutoCommits", True))
jocp.RunMethod("addDataSourceProperty", Array("maintainTimeStats", True))
Dim thres As Long = 60000
jocp.RunMethod("setLeakDetectionThreshold", Array(thres))