You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Mark Payne (JIRA)" <ji...@apache.org> on 2015/04/07 19:03:13 UTC
[jira] [Resolved] (NIFI-354) Documentation for @OnAdded, @OnRemoved
is wrong
[ https://issues.apache.org/jira/browse/NIFI-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Payne resolved NIFI-354.
-----------------------------
Resolution: Fixed
Addressed in the NIFI-250 branch that was merged into develop already
> 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)