public class MySqlDataSourceProvider extends Object implements DataSourceProvider
| Constructor and Description |
|---|
MySqlDataSourceProvider() |
| Modifier and Type | Method and Description |
|---|---|
DataSource |
createDataSource(String url,
String user,
String password)
Create MySQL datasource with fixed number of connections (minConnections: 5. maxConnections: 20)
|
DataSource |
createDataSource(String url,
String user,
String password,
int minConnections,
int maxConnections)
Create data source for MySQL database
|
String |
getDialect()
Get the dialect for MySQL database
|
static void |
initDefaultMap()
Set the Map to use MySQL Database
|
public DataSource createDataSource(String url, String user, String password)
createDataSource in interface DataSourceProviderurl - The url to access the databaseuser - database userpassword - database passwordpublic DataSource createDataSource(String url, String user, String password, int minConnections, int maxConnections)
createDataSource in interface DataSourceProviderurl - The url to access the databaseuser - database userpassword - database passwordminConnections - The minimum database connections to be open by the connection poolmaxConnections - The maximum database connections to be open by the connection poolpublic String getDialect()
getDialect in interface DataSourceProviderpublic static void initDefaultMap()
Copyright © 2018 Gumga. All rights reserved.