cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1129592 - in /cxf/trunk/rt: core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Date Tue, 31 May 2011 09:53:15 GMT
Author: ffang
Date: Tue May 31 09:53:14 2011
New Revision: 1129592

URL: http://svn.apache.org/viewvc?rev=1129592&view=rev
Log:
[CXF-3558]ensure proxy creation is thread-safe

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
    cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java?rev=1129592&r1=1129591&r2=1129592&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/factory/AbstractServiceFactoryBean.java
Tue May 31 09:53:14 2011
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.logging.Logger;
@@ -35,6 +34,7 @@ import org.w3c.dom.Document;
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.ModCountCopyOnWriteArrayList;
 import org.apache.cxf.databinding.AbstractDataBinding;
 import org.apache.cxf.databinding.DataBinding;
 import org.apache.cxf.helpers.DOMUtils;
@@ -54,7 +54,7 @@ public abstract class AbstractServiceFac
     private Bus bus;
     private DataBinding dataBinding;
     private Service service;
-    private List<FactoryBeanListener> listeners = new LinkedList<FactoryBeanListener>();
+    private List<FactoryBeanListener> listeners = new ModCountCopyOnWriteArrayList<FactoryBeanListener>();
     private Map<String, Object> sessionState = new HashMap<String, Object>();
     
     public abstract Service create();

Modified: cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java?rev=1129592&r1=1129591&r2=1129592&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
(original)
+++ cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/ClientProxyFactoryBean.java
Tue May 31 09:53:14 2011
@@ -116,7 +116,7 @@ public class ClientProxyFactoryBean exte
      *
      * @return the proxy. You must cast the returned object to the appropriate class before
using it.
      */
-    public Object create() {
+    public synchronized Object create() {
         ClassLoader orig = Thread.currentThread().getContextClassLoader();
         try {
             if (getBus() != null) {



Mime
View raw message