[ 
https://issues.apache.org/jira/browse/NIFI-3339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15839069#comment-15839069
 ] 

ASF GitHub Bot commented on NIFI-3339:
--------------------------------------

Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1417#discussion_r97921016
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-api/src/main/java/org/apache/nifi/dbcp/DBCPService.java
 ---
    @@ -31,4 +33,6 @@
     @CapabilityDescription("Provides Database Connection Pooling Service. 
Connections can be asked from pool and returned after usage.")
     public interface DBCPService extends ControllerService {
         public Connection getConnection()  throws ProcessException;
    +
    +    public DataSource getDataSource()  throws ProcessException;
    --- End diff --
    
    If we declare getDataSource() method with default implementation like 
below, we don't have to touch every existing implementation codes in test 
classes:
    
    ```
        default DataSource getDataSource()  throws ProcessException {
            throw new UnsupportedOperationException();
        }
    ```


> Add getDataSource() to DBCPService
> ----------------------------------
>
>                 Key: NIFI-3339
>                 URL: https://issues.apache.org/jira/browse/NIFI-3339
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Toivo Adams
>            Assignee: Toivo Adams
>            Priority: Minor
>
> Currently DBCPService returns only Connection. 
> Sometimes DataSource is needed, for example Spring JdbcTemplate, 
> SimpleJdbcCall need DataSource.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to