Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1354

Configuring DBCP connection pool with connection properties breaks when user/pasword is specifed and javax.* configuration is set to DBCP Driver

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0-beta
    • None
    • None

    Description

      Property combination on openjpa.* works
      <property name="openjpa.ConnectionDriver" value="org.apache.commons.dbcp.BasicDataSource"/>
      <property name="openjpa.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/test,Username=scott,Password=tiger,MaxActive=40"/>

      But mixing them as
      <property name="javax.persistence.jdbc.driver" value="org.apache.commons.dbcp.BasicDataSource"/>
      <property name="openjpa.ConnectionProperties" value="DriverClassName=com.mysql.jdbc.Driver,Url=jdbc:mysql://localhost/test,Username=scott,Password=tiger,MaxActive=40"/>

      breaks because dbcp.BasicDataSource.getConnection(user, pwd) throws UnSupportedOperationException

      Attachments

        Activity

          People

            ppoddar@apache.org Pinaki Poddar
            ppoddar@apache.org Pinaki Poddar
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: