views:

8

answers:

0

I have two applications: a Java server and a .net client. The Java server hosts a web service (JAX-WS / Metro) and the client application calls the web service (WCF). The first web service call that returns a value is always slow. It takes about 30 seconds. Calls that don't return a value or subsequent calls on the same operation are lightning fast. It doesn't matter wheter or not I call another operation first.

Profiling the Java server using JProfiler shows that the thread handling the call is runnable for a very short time and then goes to net I/O for 24 seconds (see image). The problem recurs once after restarting the server OS. Restarting the application server (Jetty 6.1.11) or the client application or client OS doesn't make any difference. The server is running Windows Embedded for POS 1.0. There is no network infrastructure between client and server other than a switch and a pair of UTP cables. It even happens when I run server and client on the same machine.

I also tried running the server on Windows XP SP3. There is also a delay there, but it's much shorter, less than a second.

JProfiler thread view