[ 
https://issues.apache.org/jira/browse/NIFI-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mark Payne updated NIFI-354:
----------------------------
    Fix Version/s: 0.1.0

> Documentation for @OnAdded, @OnRemoved is wrong
> -----------------------------------------------
>
>                 Key: NIFI-354
>                 URL: https://issues.apache.org/jira/browse/NIFI-354
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Documentation & Website
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>             Fix For: 0.1.0
>
>
> Hi,
> Nifi developer guide:
> @OnRemoved
> The @OnRemoved annotation causes a method to be invoked before a component
> is removed from the flow. This allows resources to be cleaned up before
> removing a component. Methods with this annotation must take zero arguments.
> If a method with this annotation throws an Exception, the component will
> still be removed.
> But
> /nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetJMSTopic.java
>     @OnRemoved
>     public void onRemoved(final ProcessContext context) throws IOException,
> JMSException {
>         // unsubscribe from the old subscription.
>         unsubscribe(context);
>     }
> Can onRemoved and onAdded methods take arguments?
> Actually I think  ProcessContext context is useful onRemoved and onAdded.
> And org.apache.nifi.processor.annotation.OnRemoved  states 
>  * If any method annotated with this annotation throws, the processor will
> not
> be removed from the graph.
> But guide says 'throws an Exception, the component will still be removed.'
> toivo



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

Reply via email to