Class DefaultConnectionFactory

java.lang.Object
com.pervasive.datarush.jdbc.DefaultConnectionFactory
All Implemented Interfaces:
ConnectionFactory

public final class DefaultConnectionFactory extends Object implements ConnectionFactory
Default implementation of ConnectionFactory that uses the JDBC DriverManager for creating connections.
  • Constructor Details

    • DefaultConnectionFactory

      public DefaultConnectionFactory()
  • Method Details

    • 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 interface ConnectionFactory
      Parameters:
      settings - the connection settings
      Returns:
      a newly-created JDBC connection.