Bug 1044416 - Camel Splitter does not close Closable on RuntimeException
Summary: Camel Splitter does not close Closable on RuntimeException
Keywords:
Status: MODIFIED
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Camel
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Tomohisa Igarashi
QA Contact: Matej Melko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-18 09:40 UTC by zaugg+bugzilla
Modified: 2018-03-29 21:54 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The Camel Splitter does not close the Closable Iterator if a RuntimeException occurs during its iteration. Thus the splitter does not close cleanly.
Clone Of:
Environment:
Last Closed:
Type: Enhancement


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA CAMEL-8366 0 None None None Never

Description zaugg+bugzilla 2013-12-18 09:40:25 UTC
Description of problem:
Camel Splitter does not close Closable Iterator if a RuntimeException occurs during iteration.

Version-Release number of selected component (if applicable):
Camel 2.10.0

How reproducible:
throw a RuntimeException in Closable Iterator in a Splitter Processor

Steps to Reproduce:
1. create route .split().method(MyClosableIteratorFactory.class, "createIterator")
2. throw a RuntimeException in MyClosableIterator.next() method

Actual results:
close() method does not get called

Expected results:
close() method of Closable Iterator should get called in finally block of Camel Splitter class.

Additional info:

Comment 2 kconner 2013-12-18 14:12:15 UTC
Is this within the context of FSW or Fuse?

Comment 3 Daniel Tschan, Puzzle ITC 2013-12-18 15:13:11 UTC
We encountered the issue while implementing a PoC for a customer based on JBoss Fuse Service Works 6 Beta (Build ER6).

Comment 5 Gomathi Anandan 2014-10-24 19:08:24 UTC
Resetting the flags back to the state it was before Oct-24- 2PM. There was an incorrect bulk update that I'm trying to fix.

Comment 6 tcunning 2015-02-16 16:53:47 UTC
Tomo, can you try to reproduce?   If this still exists in Camel 2.14.0, I guess we need to submit a pull against Camel.

Comment 7 Tomohisa Igarashi 2015-02-17 08:02:45 UTC
The issue still exists in camel-2.14.0, however I think it's an enhancement request rather than a bug, as Iterable is not always Closeable, and there's no rule to close Iterable when it throws RuntimeException. If user provided Iterable throws RuntimeException on next() or hasNext(), then it can close itself right before throwing it. Having said that, I'll try to see if this enhancement is acceptable for Apache camel.

Comment 8 Aileen 2015-02-17 08:50:27 UTC
Can you add link the to Camel jira?

Comment 9 Tomohisa Igarashi 2015-02-18 02:58:32 UTC
Sent a pull request to camel upstream

Comment 10 Tomohisa Igarashi 2015-02-18 07:33:31 UTC
It has been merged into upstream


Note You need to log in before you can comment on or make changes to this bug.