EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.sessions
Class DirectConnector

java.lang.Object
  extended by org.eclipse.persistence.sessions.DefaultConnector
      extended by org.eclipse.persistence.sessions.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

Field Summary
 
Fields inherited from class org.eclipse.persistence.sessions.DefaultConnector
databaseURL, driver, driverClass, driverClassName, driverURLHeader
 
Constructor Summary
DirectConnector()
          PUBLIC: Construct a Connector with default settings (Sun JDBC-ODBC bridge).
DirectConnector(java.lang.String driverClassName, java.lang.String driverURLHeader, java.lang.String databaseURL)
          PUBLIC: Construct a Connector with the specified settings.
 
Method Summary
 boolean shouldUseDriverManager(java.util.Properties properties, Session session)
          INTERNAL: Indicates whether DriverManager should be used.
 
Methods inherited from class org.eclipse.persistence.sessions.DefaultConnector
clearDriverClassAndDriver, clone, connect, directConnect, getConnectionDetails, getConnectionString, getDatabaseURL, getDriverClassName, getDriverURLHeader, initialize, instantiateDriver, loadDriverClass, setDatabaseURL, setDriverClassName, setDriverURLHeader, toString, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

EclipseLink 2.2.0, build 'v20110202-r8913' API Reference