Github user ijokarumawak commented on the issue:

    https://github.com/apache/nifi/pull/1450
  
    Hi @ToivoAdams 
    
    I think we should think who should manage the DataSource instance. For me, 
that should be NiFi DBCPService, because it provides control via NiFi UI or 
REST API to users. If we expose the DataSource instance itself, other 
components can alter or close the data source and it can cause unexpected 
behavior. For example, a custom processor gets data source from DBCPService, 
then the processor closes the data source unintentionally, then all other 
processors depending on the same DBCPService will stop working.
    
    As for wrapping DBCPService outside, as long as it provides what 
JdbcTemplate needs, then it should be a right solution. Wrapping it outside of 
NiFi is nothing wrong to do. On the other hand, removing a method from NiFi 
framework is harder than adding it. We need to have a good reason to add one to 
maintain it for a long term.
    
    If there's anything specific that doesn't work with that approach, it's 
easier to discuss.
    
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to