[
https://issues.apache.org/jira/browse/CXF-1217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12544455
]
Benson Margulies commented on CXF-1217:
---------------------------------------
When we last discussed this, there were two issues.
One was that CXF intentionally manages jetty engines with their own lifecycle.
The goal is to permit multple CXF buses to publish endpoints on the same
port(s) by sharing engines. So, a bus could shut down and leave an engine
behind, \if something else is using the engine/.
My personal opinion is that this is not a good idea, but that's not a very
important consideration. I think I left a JIRA hanging around asking for some
explicit way to turn this off, in any case.
As I understand it, this design should not effect the cases in question here,
since there shouldn't be something else holding the engine open.
I don't know the IBM JDK story.
There were bugs in the past in which the finger-counting went wrong, and the
engine would 'stay alive' for no reason.
There was also rather a strong belief, based on some very strong evidence, that
SO_REUSEADDR was \not/ the default state of Jetty's sockets. Willem put work
into adding a code path that would explicitly set this option. The next version
of Jetty has a much simpler API for that purpose, to boot.
Gary, do you know anything about the specifics of SO_REUSEADDR in Jetty?
One possibility is to write diagnostic code to read the state out.
> Address in use errors from attempt to repeatedly start and stop services
> ------------------------------------------------------------------------
>
> Key: CXF-1217
> URL: https://issues.apache.org/jira/browse/CXF-1217
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 2.1
> Environment: Any
> Reporter: Benson Margulies
> Attachments: busShutdownTest.patch.txt
>
>
> Edit org.apache.cxf.javascript.JsHttpRequestTest to take out the
> @org.junit.Ignore from the test case that has one, and run from eclipse.
> Watch the logging traffic. Observe:
> WARNING: failed [EMAIL PROTECTED]
> java.net.BindException: Address already in use: bind
> at sun.nio.ch.Net.bind(Native Method)
> which eventually, as far as I can tell, turns into:
> INFO: doOpen POST http://localhost:8808/Greeter false
> Nov 18, 2007 10:07:08 PM org.apache.cxf.javascript.JsXMLHttpRequest
> communicate
> SEVERE: IO error reading response
> java.io.FileNotFoundException: http://localhost:8808/Greeter
> On the other hand, all is well in Eclipse.
> I will probably commit a workaround to this soon, so it would be good to move
> this muddle to its own test case.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.