javax.sql.DataSource implementations
that operate on a JDBC java.sql.Driver .
SimpleDriverDataSource, DriverManagerDataSource
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private Properties | |
| private String | |
| private String | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Connection | getConnection()
Implements javax. This implementation delegates to |
| public Connection | getConnection(String
the database user on whose behalf the connection is
being made username, String the user's password password)Implements javax. This implementation delegates to |
| protected Connection | Returns: the obtained Connectionthe name of the user username, String the password to use password)Build properties for the Driver, including the given username and password (if any), and obtain a corresponding Connection. |
| protected abstract Connection | Returns: the obtained Connectionthe merged connection properties props)Obtain a Connection using the given properties. |
| public Properties | |
| public String | |
| public String | |
| public String | |
| public String | |
| public void | |
| public void | setConnectionProperties(Properties connectionProperties)
Specify arbitrary connection properties as key/value pairs, to be passed to the Driver. |
| public void | |
| public void | |
| public void | |
| public void |
| catalog | back to summary |
|---|---|
| private String catalog
| |
| connectionProperties | back to summary |
|---|---|
| private Properties connectionProperties
| |
| password | back to summary |
|---|---|
| private String password
| |
| schema | back to summary |
|---|---|
| private String schema
| |
| url | back to summary |
|---|---|
| private String url
| |
| username | back to summary |
|---|---|
| private String username
| |
| AbstractDriverBasedDataSource | back to summary |
|---|---|
| public AbstractDriverBasedDataSource() | |
| getCatalog | back to summary |
|---|---|
| public String getCatalog() Return the database catalog to be applied to each Connection, if any.
| |
| getConnection | back to summary |
|---|---|
| public Connection getConnection() throws SQLException Implements javax. This implementation delegates to
| |
| getConnection | back to summary |
|---|---|
| public Connection getConnection(String username, String password) throws SQLException Implements javax. This implementation delegates to
| |
| getConnectionFromDriver | back to summary |
|---|---|
| protected Connection getConnectionFromDriver(String username, String password) throws SQLException Build properties for the Driver, including the given username and password (if any), and obtain a corresponding Connection.
| |
| getConnectionFromDriver | back to summary |
|---|---|
| protected abstract Connection getConnectionFromDriver(Properties props) throws SQLException Obtain a Connection using the given properties. Template method to be implemented by subclasses.
| |
| getConnectionProperties | back to summary |
|---|---|
| public Properties getConnectionProperties() Return the connection properties to be passed to the Driver, if any.
| |
| getPassword | back to summary |
|---|---|
| public String getPassword() Return the JDBC password to use for connecting through the Driver.
| |
| getSchema | back to summary |
|---|---|
| public String getSchema() Return the database schema to be applied to each Connection, if any.
| |
| getUrl | back to summary |
|---|---|
| public String getUrl() Return the JDBC URL to use for connecting through the Driver.
| |
| getUsername | back to summary |
|---|---|
| public String getUsername() Return the JDBC username to use for connecting through the Driver.
| |
| setCatalog | back to summary |
|---|---|
| public void setCatalog(String catalog) Specify a database catalog to be applied to each Connection.
| |
| setConnectionProperties | back to summary |
|---|---|
| public void setConnectionProperties(Properties connectionProperties) Specify arbitrary connection properties as key/value pairs, to be passed to the Driver. Can also contain "user" and "password" properties. However, any "username" and "password" bean properties specified on this DataSource will override the corresponding connection properties. | |
| setPassword | back to summary |
|---|---|
| public void setPassword(String password) Set the JDBC password to use for connecting through the Driver. | |
| setSchema | back to summary |
|---|---|
| public void setSchema(String schema) Specify a database schema to be applied to each Connection.
| |
| setUrl | back to summary |
|---|---|
| public void setUrl(String url) Set the JDBC URL to use for connecting through the Driver. | |
| setUsername | back to summary |
|---|---|
| public void setUsername(String username) Set the JDBC username to use for connecting through the Driver. | |