bbende commented on PR #6435:
URL: https://github.com/apache/nifi/pull/6435#issuecomment-1253663725

   @tpalfy If we include `nifi-record-serialization-services` jar in two 
different NARs, then services will be discovered twice. 
   
   In the current approach that exists in main, it is not discovered twice 
because the salersforce processors have:
   ```
   <dependency>
               <groupId>org.apache.nifi</groupId>
               <artifactId>nifi-record-serialization-services</artifactId>
               <version>1.18.0-SNAPSHOT</version>
               <scope>provided</scope>
           </dependency>
   ```
   And then the salesforce NAR has a NAR dependency:
   ```
   <dependency>
               <groupId>org.apache.nifi</groupId>
               <artifactId>nifi-record-serialization-services-nar</artifactId>
               <version>1.18.0-SNAPSHOT</version>
               <type>nar</type>
           </dependency>
   ```
   So at runtime it gets access to the class through this NAR dependency.
   
   What I'm suggesting is that a processor shouldn't be directly instantiating 
an instance of a controller service (`JsonTreeRowRecordReader`). We should be 
trying to separate out whatever reusable logic we need from that service into 
utility or base classes that can then be used in both NARs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to