Class DirectConnector

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Connector

    public class DirectConnector
    extends DefaultConnector

    Purpose:Use this Connector to build a java.sql.Connection by directly instantiating the Driver, as opposed to using the DriverManager.

    See Also:
    Serialized Form
    Author:
    Big Country
    Since:
    TOPLink/Java 2.1
    • Constructor Detail

      • DirectConnector

        public DirectConnector()
        PUBLIC: Construct a Connector with default settings (Sun JDBC-ODBC bridge). Although this does not really make sense for a "direct" Connector - the Sun JdbcOdbcDriver works fine with the DriverManager.
      • DirectConnector

        public DirectConnector​(java.lang.String driverClassName,
                               java.lang.String driverURLHeader,
                               java.lang.String databaseURL)
        PUBLIC: Construct a Connector with the specified settings.
    • Method Detail

      • shouldUseDriverManager

        public boolean shouldUseDriverManager​(java.util.Properties properties,
                                              Session session)
        INTERNAL: Indicates whether DriverManager should be used.
        Overrides:
        shouldUseDriverManager in class DefaultConnector
        Returns:
        boolean