net.esper.eql.db
Class DatabaseDSConnFactory
java.lang.Object
net.esper.eql.db.DatabaseDSConnFactory
- All Implemented Interfaces:
- DatabaseConnectionFactory
public class DatabaseDSConnFactory
- extends Object
- implements DatabaseConnectionFactory
Database connection factory using InitialContext
and DataSource
to obtain connections.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DatabaseDSConnFactory
public DatabaseDSConnFactory(ConfigurationDBRef.DataSourceConnection dsConfig,
ConfigurationDBRef.ConnectionSettings connectionSettings)
- Ctor.
- Parameters:
dsConfig
- is the datasource object name and initial context properties.connectionSettings
- are the connection-level settings
getConnection
public 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