Hi, We tried to resolve this problem by setting the reuseAddress flage to the connector's socket. You can find more information here [1][2]
[1]http://www.nabble.com/EngineLifecycleTest-and-ReuseAddress-and-mysterious-systest-failures-tf4671372.html [2]http://issues.apache.org/jira/browse/CXF-1134 Willem. -----Original Message----- From: Tully, Gary [mailto:[EMAIL PROTECTED] Sent: Fri 11/16/2007 2:29 To: [email protected] Subject: shouldDestroyPort in JettyHTTPServerEngine and org.apache.cxf.transports.http_jetty.DontClosePort 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
