- java.lang.Object
-
- com.pervasive.datarush.jdbc.DefaultConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
public final class DefaultConnectionFactory extends Object implements ConnectionFactory
Default implementation ofConnectionFactory
that uses the JDBCDriverManager
for creating connections.
-
-
Constructor Summary
Constructors Constructor Description DefaultConnectionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Connection
createConnection(ConnectionSettings settings)
Create a new JDBC connection.static DriverProvider
getDriverProvider()
Gets the driver provider to use.static void
setDriverProvider(DriverProvider driver)
Sets the driver provider to use.
-
-
-
Method Detail
-
setDriverProvider
public static void setDriverProvider(DriverProvider driver)
Sets the driver provider to use. By default, we use a driver provider that first looks in the DR classloader, then looks in the system classloader.- Parameters:
driver
- the driver provider.
-
getDriverProvider
public static DriverProvider getDriverProvider()
Gets the driver provider to use. By default, we use a driver provider that first looks in the DR classloader, then looks in the system classloader.- Returns:
- the driver provider.
-
createConnection
public Connection createConnection(ConnectionSettings settings)
Description copied from interface:ConnectionFactory
Create a new JDBC connection. Implementation must allow this method to be called multiple times and by multiple threads.- Specified by:
createConnection
in interfaceConnectionFactory
- Parameters:
settings
- the connection settings- Returns:
- a newly-created JDBC connection.
-
-