public class DriverManagerConnectionFactory extends Object implements ConnectionFactory
DriverManager
-based implementation of ConnectionFactory
.Constructor and Description |
---|
DriverManagerConnectionFactory(String connectUri)
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(String connectUri,
Properties props)
Constructor for DriverManagerConnectionFactory.
|
DriverManagerConnectionFactory(String connectUri,
String uname,
String passwd)
Constructor for DriverManagerConnectionFactory.
|
Modifier and Type | Method and Description |
---|---|
Connection |
createConnection()
Create a new
Connection in an
implementation specific fashion. |
public DriverManagerConnectionFactory(String connectUri)
connectUri
- a database url of the form
jdbc:subprotocol:subname
public DriverManagerConnectionFactory(String connectUri, Properties props)
connectUri
- a database url of the form
jdbc:subprotocol:subname
props
- a list of arbitrary string tag/value pairs as
connection arguments; normally at least a "user" and "password"
property should be included.public DriverManagerConnectionFactory(String connectUri, String uname, String passwd)
connectUri
- a database url of the form
jdbc:subprotocol:subname
uname
- the database userpasswd
- the user's passwordpublic Connection createConnection() throws SQLException
ConnectionFactory
Connection
in an
implementation specific fashion.createConnection
in interface ConnectionFactory
Connection
SQLException
- if a database error occurs creating the connectionCopyright © 2001–2017 The Apache Software Foundation. All rights reserved.