[jbossws-commits] JBossWS SVN: r16193 - thirdparty/cxf/branches/cxf-2.4.6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri Apr 20 02:45:36 EDT 2012


Author: jim.ma
Date: 2012-04-20 02:45:36 -0400 (Fri, 20 Apr 2012)
New Revision: 16193

Modified:
   thirdparty/cxf/branches/cxf-2.4.6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Log:
[JBPAPP-7713]: back port the CXF-4247 fix to resolve the performance issue

Modified: thirdparty/cxf/branches/cxf-2.4.6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.4.6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java	2012-04-20 06:39:49 UTC (rev 16192)
+++ thirdparty/cxf/branches/cxf-2.4.6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java	2012-04-20 06:45:36 UTC (rev 16193)
@@ -24,7 +24,9 @@
 import java.lang.reflect.Modifier;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Future;
 import java.util.logging.Level;
@@ -78,11 +80,15 @@
      */
     private Map<Object, Class> responseMethodClassCache;
     private Map<Object, Class> requestMethodClassCache;
+    private List responseMethodClassNotFoundCache;
+    private List requestMethodClassNotFoundCache;
     private Map<Method, Annotation[][]> methodAnnotationCache;
     
     public JaxWsServiceConfiguration() {
         responseMethodClassCache = new HashMap<Object, Class>();
         requestMethodClassCache = new HashMap<Object, Class>();
+        responseMethodClassNotFoundCache = new ArrayList();
+        requestMethodClassNotFoundCache = new ArrayList();
         methodAnnotationCache = new HashMap<Method, Annotation[][]>();
     }
 
@@ -598,6 +604,9 @@
     
     @Override
     public Class getResponseWrapper(Method selected) {
+        if (this.responseMethodClassNotFoundCache.contains(selected)) {
+            return null;
+        }
         Class cachedClass = responseMethodClassCache.get(selected);
         if (cachedClass != null) {
             return cachedClass;
@@ -635,7 +644,7 @@
                 //do nothing, we will mock a schema for wrapper bean later on
             }
         }
-
+        this.responseMethodClassNotFoundCache.add(selected);
         return null;
     }
 
@@ -669,6 +678,9 @@
     
     @Override
     public Class getRequestWrapper(Method selected) {
+        if (this.requestMethodClassNotFoundCache.contains(selected)) {
+            return null;
+        }
         Class cachedClass = requestMethodClassCache.get(selected);
         if (cachedClass != null) {
             return cachedClass;
@@ -703,7 +715,7 @@
                 //do nothing, we will mock a schema for wrapper bean later on
             }
         }
-
+        this.requestMethodClassNotFoundCache.add(selected);
         return null;
     }
     



More information about the jbossws-commits mailing list