| java.lang.Object org.compass.gps.device.jdbc.datasource.AbstractDataSource org.compass.gps.device.jdbc.datasource.DriverManagerDataSource
All known Subclasses: org.compass.gps.device.jdbc.datasource.SingleConnectionDataSource,
DriverManagerDataSource | public class DriverManagerDataSource extends AbstractDataSource (Code) | | Simple implementation of the standard JDBC DataSource interface, configuring
a plain old JDBC Driver via bean properties, and returning a new Connection
for every getConnection call.
Useful for test or standalone environments outside of a J2EE container.
Pool-assuming Connection.close() calls will simply close the
Connection, so any DataSource-aware persistence code should work.
In a J2EE container, it is recommended to use a JNDI DataSource provided by
the container.
If you need a "real" connection pool outside of a J2EE container, consider Apache's Jakarta Commons DBCP.
Its BasicDataSource is a full connection pool bean, supporting the same basic
properties as this class plus specific settings.
Taken from Spring.
author: kimchy |
DriverManagerDataSource | public DriverManagerDataSource()(Code) | | Constructor for bean-style configuration.
|
DriverManagerDataSource | public DriverManagerDataSource(String driverClassName, String url, String username, String password) throws CannotGetJdbcConnectionException(Code) | | Create a new DriverManagerDataSource with the given standard
DriverManager parameters.
Parameters: driverClassName - the JDBC driver class name Parameters: url - the JDBC URL to use for accessing the DriverManager Parameters: username - the JDBC username to use for accessing the DriverManager Parameters: password - the JDBC password to use for accessing the DriverManager See Also: java.sql.DriverManager.getConnection(StringStringString) |
getDriverClassName | public String getDriverClassName()(Code) | | Return the JDBC driver class name, if any.
|
getPassword | public String getPassword()(Code) | | Return the JDBC password to use for accessing the DriverManager.
|
getUrl | public String getUrl()(Code) | | Return the JDBC URL to use for accessing the DriverManager.
|
getUsername | public String getUsername()(Code) | | Return the JDBC username to use for accessing the DriverManager.
|
Fields inherited from org.compass.gps.device.jdbc.datasource.AbstractDataSource | final protected Log log(Code)(Java Doc)
|
|
|