Jaxws cxf client hangs after multiple calls to to the same port
I have an jaxws cxf client application running on tomcat7.
I have a very strange problem, after multiple sequential calls to the webservice server, at some point the JaxwsClientProxy hangs and a could not send message error is thrown with a caused by socketexception followed by a connection timeout.
The both connection timeout and the request timeout are already set to 5 minutes. More stranger is that this behavior may vary from machine to machine.
For example on my own computer (Mac) this does not happen and every thing works fine, but on some other machines (Windows) and the production environment (Linux) this issue exist.
I've been banging my head for a week and so far no luck. I am using the following frameworks:
- Spring 2.5
- Jaxws CXF 2.7.11
- Java 1.6.0_45
- Tomcat 7
Could this be JVM bug or something? There are some forums that talk about this issue, but most of them are running on jboss and there solutions did not work for me.
I tried to change Jaxws and cxf versions but no difference. Here's a code demonstration:
GreetingsWebService service = new GreetingsWebService();
GreetingsPort port = serive.getGreetingsPort();
port.call1(); // success
port.call2(); // success
port.call3(); // error
Any advice would be greatly appreciated