Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5101

camel-cxfrs CxfRsInvoker.asyncInvoke causes thread deadlock

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-fuse-6.3
    • jboss-fuse-6.2.1
    • Camel
    • None
    • % %
    • Hide

      You can deploy the camel route to JBoss Fuse 6.1.1 container but without any backend service running on localhost and port 8080 so the camel-jetty producer endpoint will receive "Connection Refused" exception.

      Alternatively, you can have a dummy backend service running on localhost and port 8080 but you can attach a debugger to the process and suspend NIO acceptor and selector threads so the camel-jetty producer endpoint will receive a "SocketTimeout" exception when attempt making connections.

      Show
      You can deploy the camel route to JBoss Fuse 6.1.1 container but without any backend service running on localhost and port 8080 so the camel-jetty producer endpoint will receive "Connection Refused" exception. Alternatively, you can have a dummy backend service running on localhost and port 8080 but you can attach a debugger to the process and suspend NIO acceptor and selector threads so the camel-jetty producer endpoint will receive a "SocketTimeout" exception when attempt making connections.
    • Sprint 7 - towards CR2

      I have a very simple camel route:

      <from uri="cxfrs:bean:rsServerQuote?resourceClasses=org.jboss.fuse.quote.QuoteService&amp;bindingStyle=SimpleConsumer"/>
      <removeHeaders pattern="Camel*" />
      <to uri="jetty:http://localhost:8080/quote?httpClientMinThreads=1&amp;httpClientMaxThreads=5&amp;httpClient.idleTimeout=10000&amp;httpClient.timeout=10000"/>
      

      If backend service runs normally on "http://localhost:8080/quote", then everything is ok. However, if there is something wrong on the backend service and as a result, the camel-jetty producer endpoint receives either "Connection Refused" exception or "SocketTimeout" exception, thread deadlock happens.

      The only workaround to avoid thread deadlock is to change camel-cxfrs consumer endpoint from using default async API to sync API instead by adding "synchronous=true" option:

      <from uri="cxfrs:bean:rsServerQuote?resourceClasses=org.jboss.fuse.quote.QuoteService&amp;bindingStyle=SimpleConsumer&amp;synchronous=true"/>
      

            janstey@redhat.com Jonathan Anstey
            rhn-support-qluo Joe Luo
            Petr Pecka Petr Pecka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: