Author: dkulp
Date: Mon Apr 14 12:30:32 2008
New Revision: 647956
URL: http://svn.apache.org/viewvc?rev=647956&view=rev
Log:
Merged revisions 647922 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r647922 | dkulp | 2008-04-14 14:22:03 -0400 (Mon, 14 Apr 2008) | 2 lines
Sync on the Definition when writing out the wsdl since updating the wsdl and
writing it out is not a thread safe operation.
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java?rev=647956&r1=647955&r2=647956&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/transport/http/WSDLQueryHandler.java
Mon Apr 14 12:30:32 2008
@@ -151,15 +151,20 @@
def = mp.get(wsdl2);
}
- if (endpointInfo.getProperty("publishedEndpointUrl") != null) {
- String publishingUrl =
String.valueOf(endpointInfo.getProperty("publishedEndpointUrl"));
- updatePublishedEndpointUrl(publishingUrl, def,
endpointInfo.getName());
+ synchronized (def) {
+ //writing a def is not threadsafe. Sync on it to make sure
+ //we don't get any ConcurrentModificationExceptions
+ if (endpointInfo.getProperty("publishedEndpointUrl") !=
null) {
+ String publishingUrl =
+
String.valueOf(endpointInfo.getProperty("publishedEndpointUrl"));
+ updatePublishedEndpointUrl(publishingUrl, def,
endpointInfo.getName());
+ }
+
+ WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
+ .getWSDLFactory().newWSDLWriter();
+
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
+ doc = wsdlWriter.getDocument(def);
}
-
- WSDLWriter wsdlWriter = bus.getExtension(WSDLManager.class)
- .getWSDLFactory().newWSDLWriter();
-
def.setExtensionRegistry(bus.getExtension(WSDLManager.class).getExtensionRegistry());
- doc = wsdlWriter.getDocument(def);
} else {
SchemaReference si = smp.get(xsd);
if (si == null) {