Class DatabaseDMConnFactory
java.lang.Object
com.espertech.esper.common.internal.epl.historical.database.connection.DatabaseDMConnFactory
- All Implemented Interfaces:
DatabaseConnectionFactory
Database connection factory using
DriverManager
to obtain connections.-
Constructor Summary
ConstructorsConstructorDescriptionDatabaseDMConnFactory
(ConfigurationCommonDBRef.DriverManagerConnection driverConfig, ConfigurationCommonDBRef.ConnectionSettings connectionSettings, ClasspathImportService classpathImportService) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new database connection.protected static void
setConnectionOptions
(Connection connection, ConfigurationCommonDBRef.ConnectionSettings connectionSettings) Method to set connection-level configuration settings.
-
Constructor Details
-
DatabaseDMConnFactory
public DatabaseDMConnFactory(ConfigurationCommonDBRef.DriverManagerConnection driverConfig, ConfigurationCommonDBRef.ConnectionSettings connectionSettings, ClasspathImportService classpathImportService) throws DatabaseConfigException Ctor.- Parameters:
driverConfig
- is the driver manager configurationconnectionSettings
- are connection-level settingsclasspathImportService
- imports- Throws:
DatabaseConfigException
- thrown if the driver class cannot be loaded
-
-
Method Details
-
getConnection
Description copied from interface:DatabaseConnectionFactory
Creates a new database connection.- Specified by:
getConnection
in interfaceDatabaseConnectionFactory
- Returns:
- new connection
- Throws:
DatabaseConfigException
- throws to indicate a problem getting a new connection
-
setConnectionOptions
protected static void setConnectionOptions(Connection connection, ConfigurationCommonDBRef.ConnectionSettings connectionSettings) throws DatabaseConfigException Method to set connection-level configuration settings.- Parameters:
connection
- is the connection to set onconnectionSettings
- are the settings to apply- Throws:
DatabaseConfigException
- is thrown if an SQLException is thrown
-