Class SimpleDriverDataSource

  • All Implemented Interfaces:
    java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource, DriverDataSource
    Direct Known Subclasses:
    DBCPDriverDataSource

    public class SimpleDriverDataSource
    extends java.lang.Object
    implements DriverDataSource
    Non-pooling driver data source.
    • Constructor Detail

      • SimpleDriverDataSource

        public SimpleDriverDataSource()
    • Method Detail

      • getConnection

        public java.sql.Connection getConnection()
                                          throws java.sql.SQLException
        Specified by:
        getConnection in interface javax.sql.DataSource
        Throws:
        java.sql.SQLException
      • getConnection

        public java.sql.Connection getConnection​(java.lang.String username,
                                                 java.lang.String password)
                                          throws java.sql.SQLException
        Specified by:
        getConnection in interface javax.sql.DataSource
        Throws:
        java.sql.SQLException
      • getConnection

        public java.sql.Connection getConnection​(java.util.Properties props)
                                          throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getSimpleConnection

        protected java.sql.Connection getSimpleConnection​(java.util.Properties props)
                                                   throws java.sql.SQLException
        Throws:
        java.sql.SQLException
      • getLoginTimeout

        public int getLoginTimeout()
        Specified by:
        getLoginTimeout in interface javax.sql.CommonDataSource
        Specified by:
        getLoginTimeout in interface javax.sql.DataSource
      • setLoginTimeout

        public void setLoginTimeout​(int seconds)
        Specified by:
        setLoginTimeout in interface javax.sql.CommonDataSource
        Specified by:
        setLoginTimeout in interface javax.sql.DataSource
      • getLogWriter

        public java.io.PrintWriter getLogWriter()
        Specified by:
        getLogWriter in interface javax.sql.CommonDataSource
        Specified by:
        getLogWriter in interface javax.sql.DataSource
      • setLogWriter

        public void setLogWriter​(java.io.PrintWriter out)
        Specified by:
        setLogWriter in interface javax.sql.CommonDataSource
        Specified by:
        setLogWriter in interface javax.sql.DataSource
      • getConnectionPassword

        protected java.lang.String getConnectionPassword()
      • getSimpleDriver

        protected java.sql.Driver getSimpleDriver()
      • isWrapperFor

        public boolean isWrapperFor​(java.lang.Class<?> iface)
        Specified by:
        isWrapperFor in interface java.sql.Wrapper
      • unwrap

        public java.lang.Object unwrap​(java.lang.Class iface)
        Specified by:
        unwrap in interface java.sql.Wrapper
      • getParentLogger

        public java.util.logging.Logger getParentLogger()
                                                 throws java.sql.SQLFeatureNotSupportedException
        Specified by:
        getParentLogger in interface javax.sql.CommonDataSource
        Throws:
        java.sql.SQLFeatureNotSupportedException