public class DriverConnectionFactoryAdapter extends JDBCConnectionFactoryAdapter
java.sql.Driver
.
The physical connections that this adapter creates and closes are instances of
java.sql.Connection
.ConnectionFactoryAdapter
Modifier and Type | Field and Description |
---|---|
protected Properties |
m_connectionFactoryProperties |
protected Properties |
m_connectionProperties |
protected Driver |
m_driver |
m_url
Constructor and Description |
---|
DriverConnectionFactoryAdapter(Driver driver,
String url,
Properties connectionFactoryProperties,
Properties connectionProperties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
closeConnection(Object connection)
Closes the
java.sql.Connection . |
Object |
createConnection(ConnectionRetrievalInfo connectionRequestInfo)
Creates a physical
java.sql.Connection . |
Driver |
getDriver()
Gets the JDBC Driver.
|
createPooledConnection, getUrl, initializeUrlFromConnectionFactory, setUrl
protected Driver m_driver
protected final Properties m_connectionProperties
protected final Properties m_connectionFactoryProperties
public DriverConnectionFactoryAdapter(Driver driver, String url, Properties connectionFactoryProperties, Properties connectionProperties) throws UniversalConnectionPoolException
driver
- The JDBC driver. Cannot be null
.url
- The connect URL. Cannot be null
.connectionFactoryProperties
- The connection factory properties.connectionProperties
- The connection properties. If the URL
does not specify the user and password, the properties must
also contain the user and password for obtaining connections.UniversalConnectionPoolException
- if an error occurs during construction.public Driver getDriver()
null
.public Object createConnection(ConnectionRetrievalInfo connectionRequestInfo) throws UniversalConnectionPoolException
java.sql.Connection
.createConnection
in interface ConnectionFactoryAdapter
createConnection
in class oracle.ucp.common.ConnectionFactoryAdapterBase
connectionRequestInfo
- The information to use to create the
connection.java.sql.Connection
. null
if a
connection could not be created.UniversalConnectionPoolException
- if an error occurs creating the connection.public void closeConnection(Object connection) throws UniversalConnectionPoolException
java.sql.Connection
.closeConnection
in interface ConnectionFactoryAdapter
closeConnection
in class oracle.ucp.common.ConnectionFactoryAdapterBase
connection
- The java.sql.Connection
to close.UniversalConnectionPoolException
- if an error occurs closing the Connection.
Copyright © 2008, 2017, Oracle. All rights reserved.