ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-323) JDBC driver properties not added to driver/connection when using DBCP
Date Fri, 14 Jul 2006 16:05:14 GMT
    [ http://issues.apache.org/jira/browse/IBATIS-323?page=comments#action_12421142 ] 
Jeff Butler commented on IBATIS-323:

Good catch.  This is mis-documented, and mis-coded (sigh).

Turns out that, with the current implementation, the "Driver." properties are only added with
an undocumented means of configuring DBCP.  I'll fix it.  In the meantime, you can probably
make it work by doing this:

<dataSource type="DBCP"> 
  <property name="driverClassName" value="${driver}"/> 
  <property name="url" value="${url}"/> 
  <property name="username" value="${username}"/> 
  <property name="password" value="${password}"/> 
  <property value="someValue" name="Driver.DriverSpecificProperty"/> 

> JDBC driver properties not added to driver/connection when using DBCP
> ---------------------------------------------------------------------
>                 Key: IBATIS-323
>                 URL: http://issues.apache.org/jira/browse/IBATIS-323
>             Project: iBatis for Java
>          Issue Type: Bug
>          Components: SQL Maps
>    Affects Versions: 2.1.7
>         Environment: Windows, Java 1.5, Oracle 10g
>            Reporter: Florian Heinisch
>         Assigned To: Jeff Butler
> According to issue ibatis-78, support for driver properties for DBCP was added. However,
if I configure my SqlMapConfig.xml (as descriped in the documentation) to add driver properties
, the driver properties are not added:
> <dataSource type="DBCP">
>   <property name="JDBC.Driver" value="${driver}"/>
>   <property name="JDBC.ConnectionURL" value="${url}"/>
>   <property name="JDBC.Username" value="${username}"/>
>   <property name="JDBC.Password" value="${password}"/>
>   <property value="someValue" name="Driver.DriverSpecificProperty"/>
> </dataSource>
> I had a look into the source code in the class com.ibatis.common.jdbc.DbcpConfiguration.
As far as I understood, any driver properties configured by "Driver." get only added by the
method DbcpConfiguration.newDbcpConfiguration(properties) which never gets inovoked if  the
<dataSource type="DBCP"> element contains a <property="JDBC.Driver" ... /> element.
> How else could I add driver/connection specific properties using DBCP as data source?
> Regards,
> Florian

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


View raw message