You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2006/12/10 05:12:22 UTC

[jira] Updated: (DBCP-203) Want to provide a ClassLoader for BasicDataSource to use for loading a JDBC driver.

     [ http://issues.apache.org/jira/browse/DBCP-203?page=all ]

Phil Steitz updated DBCP-203:
-----------------------------

        Fix Version/s: 1.3
    Affects Version/s: 1.2.1

Seems like a reasonable enhancement to be included in 1.3.

> Want to provide a ClassLoader for BasicDataSource to use for loading a JDBC driver.
> -----------------------------------------------------------------------------------
>
>                 Key: DBCP-203
>                 URL: http://issues.apache.org/jira/browse/DBCP-203
>             Project: Commons Dbcp
>          Issue Type: New Feature
>    Affects Versions: 1.2.1
>            Reporter: Mark Grand
>            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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org