com.espertech.esper.epl.db
Class DatabaseDSFactoryConnFactory

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

public class DatabaseDSFactoryConnFactory
extends java.lang.Object
implements DatabaseConnectionFactory

Database connection factory using InitialContext and DataSource to obtain connections.


Constructor Summary
DatabaseDSFactoryConnFactory(ConfigurationDBRef.DataSourceFactory dsConfig, ConfigurationDBRef.ConnectionSettings connectionSettings)
          Ctor.
 
Method Summary
 java.sql.Connection getConnection()
          Creates a new database connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseDSFactoryConnFactory

public DatabaseDSFactoryConnFactory(ConfigurationDBRef.DataSourceFactory dsConfig,
                                    ConfigurationDBRef.ConnectionSettings connectionSettings)
                             throws DatabaseConfigException
Ctor.

Parameters:
dsConfig - is the datasource object name and initial context properties.
connectionSettings - are the connection-level settings
Throws:
DatabaseConfigException - when the factory cannot be configured
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

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