[ 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]