You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Christoph Meise (JIRA)" <ji...@apache.org> on 2009/07/22 09:01:33 UTC

[jira] Updated: (SMXCOMP-599) Tag leaves container hanging in conjunction with servicemix-camel and servicemix-jms

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

Christoph Meise updated SMXCOMP-599:
------------------------------------

    Attachment: reproduce-deadlock.jar

Ah, that's the way attaching a file works. Please find attached a very simple service assembly to reproduce this issue. It basically builds this route:
JMS Consumer-> Bean: ExceptionThrower -> onException -> JMS Producer (find the specific files within the service units for camel and jms)
What is visible is that the message is directed to the DeadLetterChannel and the onException is used but no message ever arrives in the JMS destination and no further message is consumed. JMX says, there would be an active consumer on the input queue but either this consumer seems to be blocked somehow.

I'll try to have an even deeper look into the sources and be maybe try to provide a patch and a test case. 

> <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-camel-2008.01, servicemix-camel-2009.01, servicemix-camel-2009.02, servicemix-jms-2008.01
>         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
>
>         Attachments: reproduce-deadlock.jar
>
>
> 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.