camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CXF Developer (JIRA)" <>
Subject [jira] [Created] (CAMEL-6992) Camel-CXF->Webservice Client-> 2 consecutive web-service calls fail
Date Thu, 21 Nov 2013 11:41:35 GMT
CXF Developer created CAMEL-6992:

             Summary: Camel-CXF->Webservice Client-> 2 consecutive web-service calls
                 Key: CAMEL-6992
             Project: Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.12.1
         Environment: Tomcat 7, Windows 7
            Reporter: CXF Developer

 My case is as follows:

1) I have a web-application deployed on tomcat. In this web-application, I am consuming 2
web-services. These 2 web-services are invoked sequentially without any delay.
2) Important thing to note is that the endpoint URL of both these web-services have same host-name(IP)
and same port number. Rest of the URL is different. (Both the URLs are plain HTTP. There is
3) First web-service is invoked. Camel-CXF processes and returns the response and starts a
new thread for clean-up tasks. Lets call this new thread as 'Clean-up Thread'. In this clean-up
thread, the socket (which was created while invoking this first web-service) is closed. However,
since this clean-up thread is started after the response is returned to my web-application
code, the 2nd webservice call and the 'clean-up thread(cleaning up sockets created for 1st
web-service)' execute simultaneously. And by the time, the actual ""
method is called in the 'cleanup thread', the 2nd web-service invocation is already started
using the SAME socket object.

Now, at this point, the clean-up thread closes the socket (which was created while invoking
the first web-service). And since, the second web-service invocation is using the same socket
object, the invocation of 2nd web-service terminates abruptly and the following exception
is thrown:
: Unexpected end of file from server
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$
at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$

Please let me know if you are facing any issues while reproducing the issue. I will be more
than happy to help.

This message was sent by Atlassian JIRA

View raw message