Author: richard.opalka(a)jboss.com
Date: 2012-12-19 09:07:26 -0500 (Wed, 19 Dec 2012)
New Revision: 17141
Modified:
stack/cxf/trunk/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java
Log:
fixing synchronization issues
Modified:
stack/cxf/trunk/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java
===================================================================
---
stack/cxf/trunk/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java 2012-12-19
12:44:00 UTC (rev 17140)
+++
stack/cxf/trunk/modules/addons/transports/http/httpserver/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/httpserver/HttpServerEngineFactory.java 2012-12-19
14:07:26 UTC (rev 17141)
@@ -79,7 +79,7 @@
{
return bus;
}
-
+
/**
* Retrieve a previously configured HttpServerEngine for the
* given port. If none exists, this call returns null.
@@ -97,10 +97,10 @@
public synchronized HttpServerEngine createHttpServerEngine(String host, int port,
String protocol)
throws IOException
{
- LOG.fine("Creating HttpServer Engine for port " + port + ".");
HttpServerEngine ref = null;
synchronized(portMap)
{
+ LOG.fine("Creating HttpServer Engine for port " + port +
".");
ref = retrieveHttpServerEngine(port);
if (null == ref)
{
@@ -116,7 +116,7 @@
}
return ref;
}
-
+
/**
* This method removes the Server Engine from the port map and stops it.
*/
@@ -145,7 +145,7 @@
// do nothing here
}
- public void postShutdown()
+ public synchronized void postShutdown()
{
// shut down the httpserver in the portMap
// To avoid the CurrentModificationException,
Show replies by date