Package org.eclipse.persistence.sessions
Class DirectConnector
java.lang.Object
org.eclipse.persistence.sessions.DefaultConnector
org.eclipse.persistence.sessions.DirectConnector
- All Implemented Interfaces:
Serializable
,Cloneable
,Connector
Purpose:Use this Connector to build a java.sql.Connection by directly instantiating the Driver, as opposed to using the DriverManager.
- See Also:
- Author:
- Big Country
-
Field Summary
Fields inherited from class org.eclipse.persistence.sessions.DefaultConnector
databaseURL, driver, driverClass, driverClassName, driverURLHeader
-
Constructor Summary
ConstructorDescriptionPUBLIC: Construct a Connector with default settings (Sun JDBC-ODBC bridge).DirectConnector
(String driverClassName, String driverURLHeader, String databaseURL) PUBLIC: Construct a Connector with the specified settings. -
Method Summary
Modifier and TypeMethodDescriptionboolean
shouldUseDriverManager
(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
-
Constructor Details
-
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: Construct a Connector with the specified settings.
-
-
Method Details
-
shouldUseDriverManager
INTERNAL: Indicates whether DriverManager should be used.- Overrides:
shouldUseDriverManager
in classDefaultConnector
- Returns:
- boolean
-