[ https://issues.apache.org/jira/browse/BEAM-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15568579#comment-15568579 ]
ASF GitHub Bot commented on BEAM-743: ------------------------------------- GitHub user jbonofre opened a pull request: https://github.com/apache/incubator-beam/pull/1084 [BEAM-743] JdbcIO deals right getConnection() to use with DBCP BasicDataSource 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 Agreement](https://www.apache.org/licenses/icla.txt). --- You can merge this pull request into a Git repository by running: $ git pull https://github.com/jbonofre/incubator-beam BEAM-743-JDBCIO_DBCP_USERNAME Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-beam/pull/1084.patch 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 BasicDataSource ---- > 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 (v6.3.4#6332)