<property name="acquireRetryAttempts">3</property>
<property name="acquireRetryDelay">1000</property>
Connection connection = null;
try {
connection = dataSource.getConnection();
// ...
} catch (SQLException e) {
} finally {
if (connection != null) {
try {
connection.close();
} catch (SQLException e) {
}
}
}
<property name="maxPoolSize">50</property>
<property name="initialPoolSize">10</property>
String driver = "com.mysql.jdbc.Driver";
try {
Class.forName(driver);
} catch (ClassNotFoundException e) {
}