org.eclipse.persistence.sessions
Class DirectConnector
java.lang.Object
org.eclipse.persistence.sessions.DefaultConnector
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
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 |
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.
shouldUseDriverManager
public boolean shouldUseDriverManager(java.util.Properties properties,
Session session)
- INTERNAL:
Indicates whether DriverManager should be used.
- Overrides:
shouldUseDriverManager
in class DefaultConnector
- Returns:
- boolean