Class AbstractDriverManagerConnectionSource

    • Constructor Detail

      • AbstractDriverManagerConnectionSource

        public AbstractDriverManagerConnectionSource​(String driverClassName,
                                                     String connectionString,
                                                     String actualConnectionString,
                                                     char[] userName,
                                                     char[] password,
                                                     Property[] properties)
    • Method Detail

      • getLogger

        public static Logger getLogger()
      • getActualConnectionString

        public String getActualConnectionString()
      • getConnection

        public Connection getConnection()
                                 throws SQLException
        Description copied from interface: ConnectionSource
        This should return a new connection every time it is called.
        Returns:
        the SQL connection object.
        Throws:
        SQLException - if a database error occurs.
      • getConnectionString

        public String getConnectionString()
      • getDriverClassName

        public String getDriverClassName()
      • getPassword

        public char[] getPassword()
      • getProperties

        public Property[] getProperties()
      • getUserName

        public char[] getUserName()
      • loadDriver

        protected void loadDriver​(String className)
                           throws SQLException
        Loads a JDBC driver for the given class name
        Parameters:
        className - the fully-qualified class name for a JDBC Driver.
        Throws:
        SQLException - thrown when loading the driver throws an exception.
      • toString

        public String toString()
        Description copied from interface: ConnectionSource
        All implementations must override Object.toString() to provide information about the connection configuration (obscuring passwords with one-way hashes).
        Specified by:
        toString in interface ConnectionSource
        Overrides:
        toString in class Object
        Returns:
        the string representation of this connection source.
      • toString

        protected String toString​(char[] value)