public interface JdbcService
DataSource This
class can be configured from the JdbcConfig
class which will be returned via bridje configuration API.| Modifier and Type | Method and Description |
|---|---|
void |
closeAllDataSource()
Close all the DataSources stored in the JdbcService.
|
void |
closeDataSource(DataSource dataSource)
Close the given DataSource and all its database connections.
|
DataSource |
createDataSource(DataSourceConfig config)
Creates a new pooled DataSource object from the given configuration.
|
DataSource |
getDataSource(String name)
Retrieves a pooled DataSource object associated with the given name.
|
DataSource |
getDataSourceBySchema(String schemaName)
Retrieves a pooled DataSource object associated with the given name.
|
JdbcConfig |
loadDefConfig()
Loads the default configuration for this service.
|
void |
reconnectAll(JdbcConfig config)
Close all the datasources and reconnects.
|
DataSource getDataSourceBySchema(String schemaName)
schemaName - The name of the model that was specified in the
jdbc.xml configuration file.DataSource getDataSource(String name)
name - The name of the DataSource that was specified in the jdbc.xml
configuration file.DataSource createDataSource(DataSourceConfig config)
config - The DataSource configuration parameters.void closeDataSource(DataSource dataSource) throws SQLException
dataSource - The DataSource to be closed.SQLException - If any SQLException occurs during the closing
process.void closeAllDataSource()
void reconnectAll(JdbcConfig config)
config - The new configuration to use, or null to use the same.JdbcConfig loadDefConfig() throws IOException
IOException - If the configuraion cannot be readed.Copyright © 2015–2018 Bridje Framework. All rights reserved.