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.

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
>

Reply via email to