2.3.1. I eventually realized what you wrote before, but I still can't explain how switching to Spring config changed anything.
On Mon, Jan 17, 2011 at 7:34 AM, Willem Jiang <[email protected]> wrote: > On 1/14/11 7:58 PM, Benson Margulies wrote: >> >> Then I run into the problems related to >> org.apache.cxf.transports.http_jetty.DontClosePort. Before I switched >> to spring, I could leave this on, shut down the bus, and all was well. >> With Spring, if I leave this on, I get errors failing to bind to the >> port on tests 2-N. > > Which version of CXF do you use? > I think I fixed some Application bus close issue recently, maybe you can > consider to give the CXF 2.3.2-SNAPSHOT a try ;) > > BTW, if you set the org.apache.cxf.transports.http_jetty.DontClosePort to be > true, the jetty engine will never try to close the socket, even the Spring > Application context is closed. >> >> On Thu, Jan 13, 2011 at 10:53 PM, Willem Jiang<[email protected]> >> wrote: >>> >>> On 1/14/11 9:40 AM, Benson Margulies wrote: >>>> >>>> Further report. >>>> >>>> If I reduce the http XML to just the following, I still get the >>>> 'address in use' errors. >>>> >>>> To be clearer, this is a series of unit tests inside one Junit test >>>> class. Each one starts an endpoint on the same port. I have the >>>> 'dontClose' property set because otherwise, awful things happen, just >>>> as they do in the CXF tests. >>>> >>>> Hang on, I fear that I can explain it, but if so, I don't know what to >>>> do about it. >>>> >>>> Before I added the XML config, the engine would have been created, >>>> and, due to the prop, just hung around, to be consumed over and over >>>> by the test cases. Does using the XML config (and calling .close() on >>>> the app context) cause CXF so somehow lose track and try to >>>> reconfigure the engine, thus bumping into itself? If so, anybody got >>>> any ideas? >>>> >>>> <httpj:engine-factory> >>>> <httpj:engine port="${jdd.port}"> >>>> >>>> <httpj:threadingParameters minThreads="5" >>>> maxThreads="5" /> >>>> <httpj:connector> >>>> >>>> </httpj:engine> >>>> </httpj:engine-factory> >>>> >>> If you close application context, it will tiger the bus.shutdown() and it >>> will shutdown the jetty engine. >>> So you make consider to close the application context after all the tests >>> are over. >>> >>> >>> -- >>> Willem >>> ---------------------------------- >>> FuseSource >>> Web: http://www.fusesource.com >>> Blog: http://willemjiang.blogspot.com (English) >>> http://jnn.javaeye.com (Chinese) >>> Twitter: willemjiang >>> >> > > > -- > Willem > ---------------------------------- > FuseSource > Web: http://www.fusesource.com > Blog: http://willemjiang.blogspot.com (English) > http://jnn.javaeye.com (Chinese) > Twitter: willemjiang >
