cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tully, Gary" <Gary.Tu...@iona.com>
Subject shouldDestroyPort in JettyHTTPServerEngine and org.apache.cxf.transports.http_jetty.DontClosePort
Date Thu, 15 Nov 2007 18:29:53 GMT
Hi,

There is a comment in the source[1] in shouldDestroyPort, included
below. I found the ..DontClosePort system property useful in a little
test that serially used the same bus with a shutdown in between.

   Bus bus = ..
   doJaxwsClientServerWork();
   bus.shutdown()

   bus = ..
   doJaxwsClientServerWork();
   bus.shutdown()

Setting the property to ensure that we don't call into jetty on shutdown
makes the test work, without it the second call to
doJaxwsClientServerWork() will hang and eventually timeout with a socket
read error.

Do we have any more information on this issue other than what is
suggested in the comment. Do we fully understand the problem?

I am wondering if we need to ensure client proxies close off their
connections on shutdown or if there is a low level tcp option to reduce
the wait time on a half closed socket or if we should be disabling
keep-alive if we are in a single JVM scenario.

I am thinking that the test case is a little too 'testy' to be worth
worrying about but I imagine that in a well used container environment
where there are refreshes going on this is likely to bite us and if the
only option is to globally stop asking jetty to do shutdown we will be
in trouble when we 'really' want to shutdown.

Thanks in advance,
Gary.


The comment:

       //if we shutdown the port, on SOME OS's/JVM's, if a client 
        //in the same jvm had been talking to it at some point and keep
alives 
        //are on, then the port is held open for about 60 seconds 
        //afterword and if we restart, connections will then 
        //get sent into the old stuff where there are 
        //no longer any servant registered. They pretty much just hang. 
         
        //this is most often seen in our unit/system tests that 
        //test things in the same VM. 


[1]
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/http-jett
y/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngin
e.java?view=diff&r1=581340&r2=581341 
 

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Mime
View raw message