You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Florian Heinisch (JIRA)" <ib...@incubator.apache.org> on 2006/07/14 13:57:13 UTC

[jira] Created: (IBATIS-323) JDBC driver properties not added to driver/connection when using DBCP

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


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

        

[jira] Commented: (IBATIS-323) JDBC driver properties not added to driver/connection when using DBCP

Posted by "Brandon Goodin (JIRA)" <ib...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/IBATIS-323?page=comments#action_12421234 ] 
            
Brandon Goodin commented on IBATIS-323:
---------------------------------------

Hmmm... this seemed to work when it was fixed in issue 78 (http://issues.apache.org/jira/browse/IBATIS-78) (sigh)

> 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
>             Fix For: 2.2.0
>
>
> 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

        

[jira] Closed: (IBATIS-323) JDBC driver properties not added to driver/connection when using DBCP

Posted by "Jeff Butler (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-323?page=all ]

Jeff Butler closed IBATIS-323.
------------------------------

    Fix Version/s: 2.2.0
       Resolution: Fixed

Fixed in SVN.  I updated the PDF documentation with information about the new configuration option, but there is also documentation about it here:

http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=705


> 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
>             Fix For: 2.2.0
>
>
> 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

        

[jira] Commented: (IBATIS-323) JDBC driver properties not added to driver/connection when using DBCP

Posted by "Jeff Butler (JIRA)" <ib...@incubator.apache.org>.
    [ 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"/> 
</dataSource> 


> 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