Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
2.6.1
-
None
-
Centos 6
Description
DriverManager.getConnection works perfectly. Way better performance than old mysql driver
But I am struggling with your pool code example:
https://mariadb.com/kb/en/pool-datasource-implementation/
MariaDbPoolDataSource pool = new MariaDbPoolDataSource("jdbc:mariadb://server/db?user=myUser&maxPoolSize=10");
try (Connection connection = pool.getConnection()) {
try (Statement stmt = connection.createStatement())
}
I have these imports:
import java.sql.*;
import javax.sql.*;
I compile as normal, but get this error:
javac select_con_mdb_ds_pool.java
select_con_mdb_ds_pool.java:46: error: cannot find symbol
MariaDbPoolDataSource pool = new MariaDbPoolDataSource("jdbc:mariadb://192.168.1.155?user=xxx&password=yy&maxPoolSize=10");
^
symbol: class MariaDbPoolDataSource
location: class select_con_mdb_ds_pool
select_con_mdb_ds_pool.java:46: error: cannot find symbol
MariaDbPoolDataSource pool = new MariaDbPoolDataSource("jdbc:mariadb://192.168.1.155?user=xxx&password=yy&maxPoolSize=10");
^
symbol: class MariaDbPoolDataSource
location: class select_con_mdb_ds_pool
2 errors
I'm probably doing something stupid - any help would be appreciated!