| java.lang.Object org.apache.lucene.store.jdbc.datasource.AbstractDataSource org.apache.lucene.store.jdbc.datasource.DriverManagerDataSource
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.
Note, autoCommit property defaults to false.
author: kimchy |
DriverManagerDataSource | public DriverManagerDataSource()(Code) | | Constructor for bean-style configuration.
|
DriverManagerDataSource | public DriverManagerDataSource(String driverClassName, String url, String username, String password, boolean autoCommit)(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 Parameters: autoCommit - the default autoCommit value that will be set to created connections See Also: java.sql.DriverManager.getConnection(StringStringString) |
DriverManagerDataSource | public DriverManagerDataSource(String url, String username, String password)(Code) | | Create a new DriverManagerDataSource with the given standard
DriverManager parameters.
Note, the autoCommit will default to false .
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) |
DriverManagerDataSource | public DriverManagerDataSource(String url)(Code) | | Create a new DriverManagerDataSource with the given JDBC URL, not
specifying a username or password for JDBC access.
Parameters: url - the JDBC URL to use for accessing the DriverManager See Also: java.sql.DriverManager.getConnection(String) |
getAutoCommit | public boolean getAutoCommit()(Code) | | Returns the auto commit setting that a connection will be created
|
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.
|
setAutoCommit | public void setAutoCommit(boolean autoCommit)(Code) | | Sets the auto commit setting that a connection will be created
|
|
|