<onException> Tag leaves container hanging in conjunction with servicemix-camel
and servicemix-jms
--------------------------------------------------------------------------------------------------
Key: SMXCOMP-599
URL: https://issues.apache.org/activemq/browse/SMXCOMP-599
Project: ServiceMix Components
Issue Type: Bug
Components: servicemix-camel
Affects Versions: servicemix-jms-2008.01, servicemix-camel-2009.01,
servicemix-camel-2008.01, servicemix-camel-2009.02
Environment: Especially out of the box installation of ServiceMix 3.3
using several servicemix-camel-installer
Reporter: Christoph Meise
Fix For: servicemix-camel-2009.02
The <onException> tag does not work as expected. Using this spring definition
within a camel service unit:
<spring:bean id="exceptionThrower"
class="de.cme.bug.report.ExceptionThrower"/>
<camelContext id="reproduce-deadlock-context">
<endpoint id="consumer-messages"
uri="jbi:endpoint:http://www.cme.de/consumerMessages/endpoint" />
<endpoint id="provider-failed-messages"
uri="jbi:endpoint:http://www.cme.de/producerErrorData/endpoint" />
<route>
<from ref="consumer-messages"/>
<bean ref="exceptionThrower"/>
<to uri="log:success.logger"/>
<onException>
<exception>java.lang.Exception</exception>
<handled>
<constant>true</constant>
</handled>
<to ref="provider-failed-messages"/>
</onException>
</route>
</camelContext>
Incoming messages can be provided using servicemix-jms means and in an
exception the message should be forwarded to a jms provider. The
ExceptionThrower - as it says - allows throws an IOException. Now if an
Exception occurs like:
ERROR - DeadLetterChannel - Failed delivery for exchangeId:
ID-isdeblnws324/3179-1248190130315/0-0. On delivery attempt: 0 caught:
java.io.IOExcept
ion
java.io.IOException
at de.cme.bug.report.ExceptionThrower.process(ExceptionThrower.java:10)
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:80)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:189)
at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:133)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
.
. more stacktrace
.
ERROR - DeadLetterChannel - Failed delivery for exchangeId:
ID-isdeblnws324/3179-1248190130315/0-0. Handled by the failure processor:
sendTo(Endpoi
nt[endpoint:http://www.cme.de/producerErrorData/endpoint])
I can see the <onException> definition doing the handling. But having had one
Exception handled, no more messages will be consumed later on. Getting a thread
dump I don't see any blocked threads. Also the effect is not depending on the
type of flow (seda or jms).
I can provide a sample service assembly allowing reproduction of this behaviour
if needed. I would attach it to this issues if I knew how. Right now I
circumvent the issue using the try/catch construct, but I'd rather have an
asynchronous error handling provided by the onException handler.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.