public class DatabaseDMConnFactory extends Object implements DatabaseConnectionFactory
DriverManager
to obtain connections.Constructor and Description |
---|
DatabaseDMConnFactory(ConfigurationDBRef.DriverManagerConnection driverConfig,
ConfigurationDBRef.ConnectionSettings connectionSettings,
EngineImportService engineImportService)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Creates a new database connection.
|
protected static void |
setConnectionOptions(Connection connection,
ConfigurationDBRef.ConnectionSettings connectionSettings)
Method to set connection-level configuration settings.
|
public DatabaseDMConnFactory(ConfigurationDBRef.DriverManagerConnection driverConfig, ConfigurationDBRef.ConnectionSettings connectionSettings, EngineImportService engineImportService) throws DatabaseConfigException
driverConfig
- is the driver manager configurationconnectionSettings
- are connection-level settingsengineImportService
- engine importsDatabaseConfigException
- thrown if the driver class cannot be loadedpublic Connection getConnection() throws DatabaseConfigException
DatabaseConnectionFactory
getConnection
in interface DatabaseConnectionFactory
DatabaseConfigException
- throws to indicate a problem getting a new connectionprotected static void setConnectionOptions(Connection connection, ConfigurationDBRef.ConnectionSettings connectionSettings) throws DatabaseConfigException
connection
- is the connection to set onconnectionSettings
- are the settings to applyDatabaseConfigException
- is thrown if an SQLException is thrown