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.
| Modifier and Type | Field and Description |
|---|---|
protected Driver |
cachedInstance
cache up the instantiated Driver to speed up reconnects
|
databaseURL, driverClassName, driverURLHeader| Constructor and Description |
|---|
DirectConnector()
PUBLIC:
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.
|
| Modifier and Type | Method and Description |
|---|---|
Connection |
connect(Properties properties)
INTERNAL:
Connect with the specified properties and return the Connection.
|
protected Driver |
instantiateDriver(Class driverClass)
INTERNAL:
Instantiate the Driver if necessary.
|
clone, getConnectionDetails, getConnectionString, getDatabaseURL, getDriverClassName, getDriverURLHeader, initialize, loadDriver, setDatabaseURL, setDriverClassName, setDriverURLHeader, toString, toStringprotected Driver cachedInstance
public DirectConnector()
public Connection connect(Properties properties) throws DatabaseException
connect in interface Connectorconnect in class DefaultConnectorDatabaseExceptionprotected Driver instantiateDriver(Class driverClass) throws DatabaseException
DatabaseExceptionCopyright © 2025. All rights reserved.