-
Bug
-
Resolution: Done
-
Major
-
jbossws-cxf-4.0.0.Beta3
-
None
-
Workaround Exists
-
At AS7 server startup, all deployments are deployed in a batch and multiple threads can call createHttpServerEngine. Although the method is synchronized, the behavior is not as expected. The Engine gets created multiple times for the same port (context paths are different) and results in
Caused by: java.lang.RuntimeException: java.net.BindException: Address already in use: bind
at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerEngine.addHandler(HttpServerEngine.java:103)
at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerDestination.activate(HttpServerDestination.java:128)
at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)
at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(AbstractBaseBindingFactory.java:97)
at org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:836)
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:127)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:341)
... 15 more
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind(Native Method) [:1.6.0_26]
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) [:1.6.0_26]
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) [:1.6.0_26]
at org.jboss.sun.net.httpserver.ServerImpl.<init>(ServerImpl.java:112)
at org.jboss.sun.net.httpserver.HttpServerImpl.<init>(HttpServerImpl.java:47)
at org.jboss.sun.net.httpserver.DefaultHttpServerProvider.createHttpServer(DefaultHttpServerProvider.java:37)
at org.jboss.com.sun.net.httpserver.HttpServer.create(HttpServer.java:126)
at org.jboss.wsf.stack.cxf.addons.transports.httpserver.HttpServerEngine.addHandler(HttpServerEngine.java:94)