Class UnpooledDataSource

  • All Implemented Interfaces:
    java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource

    public class UnpooledDataSource
    extends java.lang.Object
    implements javax.sql.DataSource
    Author:
    Clinton Begin, Eduardo Macarron
    • Constructor Detail

      • UnpooledDataSource

        public UnpooledDataSource()
      • UnpooledDataSource

        public UnpooledDataSource​(java.lang.String driver,
                                  java.lang.String url,
                                  java.lang.String username,
                                  java.lang.String password)
      • UnpooledDataSource

        public UnpooledDataSource​(java.lang.String driver,
                                  java.lang.String url,
                                  java.util.Properties driverProperties)
      • UnpooledDataSource

        public UnpooledDataSource​(java.lang.ClassLoader driverClassLoader,
                                  java.lang.String driver,
                                  java.lang.String url,
                                  java.lang.String username,
                                  java.lang.String password)
      • UnpooledDataSource

        public UnpooledDataSource​(java.lang.ClassLoader driverClassLoader,
                                  java.lang.String driver,
                                  java.lang.String url,
                                  java.util.Properties driverProperties)
    • 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
      • setLoginTimeout

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

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

        public void setLogWriter​(java.io.PrintWriter logWriter)
        Specified by:
        setLogWriter in interface javax.sql.CommonDataSource
        Specified by:
        setLogWriter 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
      • getDriverClassLoader

        public java.lang.ClassLoader getDriverClassLoader()
      • setDriverClassLoader

        public void setDriverClassLoader​(java.lang.ClassLoader driverClassLoader)
      • getDriverProperties

        public java.util.Properties getDriverProperties()
      • setDriverProperties

        public void setDriverProperties​(java.util.Properties driverProperties)
      • getDriver

        public java.lang.String getDriver()
      • setDriver

        public void setDriver​(java.lang.String driver)
      • getUrl

        public java.lang.String getUrl()
      • setUrl

        public void setUrl​(java.lang.String url)
      • getUsername

        public java.lang.String getUsername()
      • setUsername

        public void setUsername​(java.lang.String username)
      • getPassword

        public java.lang.String getPassword()
      • setPassword

        public void setPassword​(java.lang.String password)
      • isAutoCommit

        public java.lang.Boolean isAutoCommit()
      • setAutoCommit

        public void setAutoCommit​(java.lang.Boolean autoCommit)
      • getDefaultTransactionIsolationLevel

        public java.lang.Integer getDefaultTransactionIsolationLevel()
      • setDefaultTransactionIsolationLevel

        public void setDefaultTransactionIsolationLevel​(java.lang.Integer defaultTransactionIsolationLevel)
      • getDefaultNetworkTimeout

        public java.lang.Integer getDefaultNetworkTimeout()
        Since:
        3.5.2
      • setDefaultNetworkTimeout

        public void setDefaultNetworkTimeout​(java.lang.Integer defaultNetworkTimeout)
        Sets the default network timeout value to wait for the database operation to complete. See Connection.setNetworkTimeout(java.util.concurrent.Executor, int)
        Parameters:
        defaultNetworkTimeout - The time in milliseconds to wait for the database operation to complete.
        Since:
        3.5.2
      • unwrap

        public <T> T unwrap​(java.lang.Class<T> iface)
                     throws java.sql.SQLException
        Specified by:
        unwrap in interface java.sql.Wrapper
        Throws:
        java.sql.SQLException
      • isWrapperFor

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

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