com.espertech.esper.epl.db
Class DatabaseDMConnFactory

java.lang.Object
  extended by com.espertech.esper.epl.db.DatabaseDMConnFactory
All Implemented Interfaces:
DatabaseConnectionFactory

public class DatabaseDMConnFactory
extends java.lang.Object
implements DatabaseConnectionFactory

Database connection factory using DriverManager to obtain connections.


Constructor Summary
DatabaseDMConnFactory(ConfigurationDBRef.DriverManagerConnection driverConfig, ConfigurationDBRef.ConnectionSettings connectionSettings)
          Ctor.
 
Method Summary
 java.sql.Connection getConnection()
          Creates a new database connection.
protected static void setConnectionOptions(java.sql.Connection connection, ConfigurationDBRef.ConnectionSettings connectionSettings)
          Method to set connection-level configuration settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseDMConnFactory

public DatabaseDMConnFactory(ConfigurationDBRef.DriverManagerConnection driverConfig,
                             ConfigurationDBRef.ConnectionSettings connectionSettings)
                      throws DatabaseConfigException
Ctor.

Parameters:
driverConfig - is the driver manager configuration
connectionSettings - are connection-level settings
Throws:
DatabaseConfigException - thrown if the driver class cannot be loaded
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws DatabaseConfigException
Description copied from interface: DatabaseConnectionFactory
Creates a new database connection.

Specified by:
getConnection in interface DatabaseConnectionFactory
Returns:
new connection
Throws:
DatabaseConfigException - throws to indicate a problem getting a new connection

setConnectionOptions

protected static void setConnectionOptions(java.sql.Connection connection,
                                           ConfigurationDBRef.ConnectionSettings connectionSettings)
                                    throws DatabaseConfigException
Method to set connection-level configuration settings.

Parameters:
connection - is the connection to set on
connectionSettings - are the settings to apply
Throws:
DatabaseConfigException - is thrown if an SQLException is thrown

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com