Class DriverManagerDataSourceFactory


  • public final class DriverManagerDataSourceFactory
    extends java.lang.Object
    Deprecated.
    Use the new factories in DataSources. See examples.

    A static factory that creates DataSources which simply forward calls to java.sql.DriverManager without any pooling or other fanciness.

    The DataSources returned are Refereneable and Serializable; they should be suitable for placement in a wide variety of JNDI Naming Services.

    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static javax.sql.DataSource create​(java.lang.String jdbcUrl)
      Deprecated.
      Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
      static javax.sql.DataSource create​(java.lang.String driverClass, java.lang.String jdbcUrl)
      Deprecated.
      Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
      static javax.sql.DataSource create​(java.lang.String jdbcUrl, java.lang.String dfltUser, java.lang.String dfltPassword)
      Deprecated.
      Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
      static javax.sql.DataSource create​(java.lang.String driverClass, java.lang.String jdbcUrl, java.lang.String dfltUser, java.lang.String dfltPassword)
      Deprecated.
      Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
      static javax.sql.DataSource create​(java.lang.String driverClass, java.lang.String jdbcUrl, java.lang.String dfltUser, java.lang.String dfltPassword, java.lang.String refFactoryLoc)
      Deprecated.
      Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
      static javax.sql.DataSource create​(java.lang.String driverClass, java.lang.String jdbcUrl, java.util.Properties props, java.lang.String refFactoryLoc)
      Deprecated.
      Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static javax.sql.DataSource create​(java.lang.String driverClass,
                                                  java.lang.String jdbcUrl,
                                                  java.lang.String dfltUser,
                                                  java.lang.String dfltPassword,
                                                  java.lang.String refFactoryLoc)
                                           throws java.sql.SQLException
        Deprecated.
        Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
        Parameters:
        driverClass - a jdbc driver class that can resolve jdbcUrl.
        jdbcUrl - the jdbcUrl of the RDBMS that Connections should be made to.
        dfltUser - a username (may be null) for authentication to the RDBMS
        dfltPassword - a password (may be null) for authentication to the RDBMS
        refFactoryLoc - a codebase url where JNDI clients can find the c3p0 libraries. Use null if clients will be expected to have the libraries available locally.
        Throws:
        java.sql.SQLException
      • create

        public static javax.sql.DataSource create​(java.lang.String driverClass,
                                                  java.lang.String jdbcUrl,
                                                  java.util.Properties props,
                                                  java.lang.String refFactoryLoc)
                                           throws java.sql.SQLException
        Deprecated.
        Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
        Parameters:
        driverClass - a jdbc driver class that can resolve jdbcUrl.
        jdbcUrl - the jdbcUrl of the RDBMS that Connections should be made to.
        props - propertis object that should be passed to DriverManager.getConnection()
        refFactoryLoc - a codebase url where JNDI clients can find the c3p0 libraries. Use null if clients will be expected to have the libraries available locally.
        Throws:
        java.sql.SQLException
      • create

        public static javax.sql.DataSource create​(java.lang.String driverClass,
                                                  java.lang.String jdbcUrl,
                                                  java.lang.String dfltUser,
                                                  java.lang.String dfltPassword)
                                           throws java.sql.SQLException
        Deprecated.
        Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
        Parameters:
        driverClass - a jdbc driver class that can resolve jdbcUrl.
        jdbcUrl - the jdbcUrl of the RDBMS that Connections should be made to.
        dfltUser - a username (may be null) for authentication to the RDBMS
        dfltPassword - a password (may be null) for authentication to the RDBMS
        Throws:
        java.sql.SQLException
      • create

        public static javax.sql.DataSource create​(java.lang.String driverClass,
                                                  java.lang.String jdbcUrl)
                                           throws java.sql.SQLException
        Deprecated.
        Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.
        Parameters:
        driverClass - a jdbc driver class that can resolve jdbcUrl.
        jdbcUrl - the jdbcUrl of the RDBMS that Connections should be made to.
        Throws:
        java.sql.SQLException
      • create

        public static javax.sql.DataSource create​(java.lang.String jdbcUrl,
                                                  java.lang.String dfltUser,
                                                  java.lang.String dfltPassword)
                                           throws java.sql.SQLException
        Deprecated.
        Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.

        Warning: since you do not set the driver class, the resulting DataSource will be less suitable for use via JNDI: JNDI clients will have to know the driver class and make sure themselves that it is preloaded!!!

        Parameters:
        jdbcUrl - the jdbcUrl of the RDBMS that Connections should be made to.
        dfltUser - a username (may be null) for authentication to the RDBMS
        dfltPassword - a password (may be null) for authentication to the RDBMS
        Throws:
        java.sql.SQLException
      • create

        public static javax.sql.DataSource create​(java.lang.String jdbcUrl)
                                           throws java.sql.SQLException
        Deprecated.
        Creates an unpooled DataSource that users java.sql.DriverManager behind the scenes to acquire Connections.

        Warning: since you do not set the driver class, the resulting DataSource will be less suitable for use via JNDI: JNDI clients will have to know the driver class and make sure themselves that it is preloaded!!!

        Parameters:
        jdbcUrl - the jdbcUrl of the RDBMS that Connections should be made to.
        Throws:
        java.sql.SQLException