You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2010/02/15 05:11:28 UTC
[jira] Closed: (DBCP-203) Want to provide a ClassLoader for
BasicDataSource to use for loading a JDBC driver.
[ https://issues.apache.org/jira/browse/DBCP-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Steitz closed DBCP-203.
----------------------------
> Want to provide a ClassLoader for BasicDataSource to use for loading a JDBC driver.
> -----------------------------------------------------------------------------------
>
> Key: DBCP-203
> URL: https://issues.apache.org/jira/browse/DBCP-203
> Project: Commons Dbcp
> Issue Type: New Feature
> Affects Versions: 1.2.1
> Reporter: Mark Grand
> Assignee: Mark Thomas
> Priority: Minor
> Fix For: 1.3
>
>
> I have an application that will be configured to use a JDBC driver at run time. It would be helpful if I could set the ClassLoader that BasicDataSource uses to load the JDBC driver.
> I don't know what the procedure is for submitting improvements, but this is something that I could add myself. the code would look like this:
> private ClassLoader driverLoader = getClass().getClassLoader();
> ...
> public ClassLoader getDriverLoader() {
> return driverLoader();
> }
> public void setDriverLoader(ClassLoader newValue) {
> driverLoader = newValue;
> }
> ...
> Change the statement that in createDataSource from
> Class.forName(driverClassName);
> to be
> Class.forName(driverClassName, true, driverLoader);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.