ASF GitHub Bot commented on BEAM-743:

GitHub user jbonofre opened a pull request:


    [BEAM-743] JdbcIO deals right getConnection() to use with DBCP 

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
     - [X] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [X] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [X] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [X] If this contribution is large, please file an Apache
           [Individual Contributor License 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jbonofre/incubator-beam 

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1084
commit ee5a0b1445a3f3f57535471baf53146a8df66884
Author: Jean-Baptiste Onofré <jbono...@apache.org>
Date:   2016-10-12T12:23:51Z

    [BEAM-743] JdbcIO deals right getConnection() to use with DBCP 


> JdbcIO should not use getConnection() with username and password when using 
> DBCP BasicDataSource
> ------------------------------------------------------------------------------------------------
>                 Key: BEAM-743
>                 URL: https://issues.apache.org/jira/browse/BEAM-743
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-java-extensions
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
> When we use an username and password, {{JdbcIO}} uses 
> {{dataSource.getConnection(username, password)}}.
> However, this method is not supported by DBCP {{BasicDataSource}} (as the 
> username and password are already part of the data source).
> Basically, the test should be if username is not null and if datasource (user 
> provided) is not null, then we use {{getConnection(username, password)}} 
> else, we just use {{getConnection()}}.

This message was sent by Atlassian JIRA

Reply via email to