Forum Discussion
L4L7_53191
Mar 22, 2011Nimbostratus
Frank: a few notes, hopefully it'll help you figure out what is going on.
While you're right about web service "sessions" (sort of a misnomer because there aren't sessions at all!), they are a separate thing from *connections*. What you're describing here sounds like socket re-use. If you tcpdump I'd bet you'll see that the client is using http 1.1 and re-using an existing socket. If that's the case, you're using keep-alives. This isn't necessarily a Bad Thing, as it means that your re-using sockets efficiently and avoiding setup/teardown overhead. So if you REALLY want to force the issue, add a Connection: close to the headers, which will tell the server to close down the socket and not attempt re-use. From a trivial search for JAX-ws keep alive behavior it looks like that it is in fact enabled by default. Turn it off explicitly by setting it to false, or you can force the issue with Connection: close as I mentioned above.
But again: think about the environment overall, and you may arrive at the conclusion that keep-alive isn't so bad. Each request is atomic, but connections don't have to be necessarily.
Lastly, look at reselect as an option in your action on service down.
HTH,
-Matt