bobpaulin commented on code in PR #11543:
URL: https://github.com/apache/nifi/pull/11543#discussion_r3792218598


##########
nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java:
##########
@@ -2029,59 +2030,97 @@ public List<ConnectorMethod> getConnectorMethods() {
 
     @Override
     public String invokeConnectorMethod(final String methodName, final 
Map<String, String> jsonArguments, final ProcessContext processContext) throws 
InvocationFailedException {
-        final ConfigurableComponent component = getComponent();
-
-        try (final NarCloseable ignored = 
NarCloseable.withComponentNarLoader(getExtensionManager(), 
component.getClass(), getIdentifier())) {
-            final Method implementationMethod = 
discoverConnectorMethod(component.getClass(), methodName);
-            final MethodArgument[] methodArguments = 
getConnectorMethodArguments(methodName, implementationMethod, component);
-            final List<Object> argumentValues = new ArrayList<>();
-
-            for (final MethodArgument methodArgument : methodArguments) {
-                if (ProcessContext.class.equals(methodArgument.type())) {
-                    continue;
-                }
-
-                final String jsonValue = 
jsonArguments.get(methodArgument.name());
-                if (jsonValue == null && methodArgument.required()) {
-                    throw new IllegalArgumentException("Cannot invoke 
Connector Method '" + methodName + "' on " + this + " because the required 
argument '"
-                        + methodArgument.name() + "' was not provided");
+        final boolean classpathDifferent = 
isClasspathDifferent(processContext.getProperties());

Review Comment:
   Yes this make sense.  The property overrides won't come into play here in 
the same sense they do for verify so it makes sense to remove it.  
   
   I'm modifying my approach to instead consider 
isReloadAdditionalResourcesNecessary in combination with the FlowContextType 
being WORKING.   In all cases I can think of once the FlowContext is active all 
classes should be loaded with changes only coming from subsequent applies 
(where classes should also be loaded).  This is a problem that impacts the 
WORKING FlowContext exclusively so those are appropriate for the temp instance 
to be used.  Any ACTIVE flow context should be expected to use the actual 
instance ClassLoader of that component to avoid the issues you're mentioning 
above.



-- 
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