camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <>
Subject [jira] [Commented] (CAMEL-7705) DynamicRouter hangs thread after bean binding failure
Date Thu, 12 Feb 2015 07:42:12 GMT


Claus Ibsen commented on CAMEL-7705:

Cannot reproduce this. Then mvn clean install works, and so does running SessionResourceManagerFailureTest.

Though I had to fix the pom.xml to remove the soapui maven plugin as its not in maven central,
and common-logging had an invalid version.

The com.fleurida.camel.dyn.DynamicSourceRouter#route is invoked 2 times, and both times the
xpath headers have values.

> DynamicRouter hangs thread after bean binding failure
> -----------------------------------------------------
>                 Key: CAMEL-7705
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.13.2
>            Reporter: Niels Bertram
>             Fix For: 2.13.4, 2.14.2, 2.15.0
>         Attachments:
> I have come across a rather complex problem that results in servicemix going into a limbo
state not allowing me to deinstall or reinstall the camel context that causes the issue. I
replicated the issue in a camel blueprint test with a very scaled down version of the actual
implementation - just enough to show how and why it fails (see attached zip of the maven project).
> Here is how it works (or better does not work):
> The example contains a route called {{SessionResourceRoute}} that simply accepts a message
payload and hands it over to a bean called {{DynamicSourceRouter}} which has a route method
annotated with {{@DynamicRouter}}.
> The routing slip method looks something like that (full detail in code attached):
> {code:java}
> @DynamicRouter
> public String route(
>   @Header(Exchange.SLIP_ENDPOINT) String previous,
>   @Header(SOURCE_ADAPTER) String sourceAdapter,
>   @XPath(value = "/child::node()/local-name()") String messageType,
>   @XPath(value = "/child::node()/@version") String messageVersion,
>   Exchange exchange) {
>   ...
> {code}
> The "logic" within the dynamic router will resolve to send the payload onto another route
defined in {{OneSessionResourceRoute}}. This route will send the request message to a CXF
endpoint that is configured to return a soap fault.
> When the cxf route fails, the dynamic route method on the {{DynamicSourceRouter}} is
called again to work out if there are others that need to be called. Unfortunately when the
route returns from the CXF the message is the CXFPayload containing the soap fault and when
camel tries to extract the XPath values out of the failed exchange, itself will fall over
and then the thread just hangs.
> I understand that this is fixable but I simply like to point out that the dynamic router
will make the context thread hang and in my case turns servicemix into a wobble. It also is
not very intuitive for someone not as well versed with camel as to what actually is happening.
> To replicate the issue, simply run the maven project as
> {{mvn clean test}}
> OR manually 
> - import {{\[project.basedir\]/src/test/resources/SessionResourceMock-soapui-project.xml}}
into SoapUI and start the mock
> - use your favourite IBE to run unit test {{SessionResourceManagerFailureTest}}
> You will see that the test has to be stopped with CTRL+C or Z or you'll have to kill
the test process in the IDE ...

This message was sent by Atlassian JIRA

View raw message