cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1327786 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Date Thu, 19 Apr 2012 02:31:32 GMT
Author: ema
Date: Thu Apr 19 02:31:32 2012
New Revision: 1327786

URL: http://svn.apache.org/viewvc?rev=1327786&view=rev
Log:
Merged revisions 1327780 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

................
  r1327780 | ema | 2012-04-19 10:14:47 +0800 (Thu, 19 Apr 2012) | 9 lines
  
  Merged revisions 1327778 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1327778 | ema | 2012-04-19 09:59:42 +0800 (Thu, 19 Apr 2012) | 1 line
    
    [CXF-4247]:Add cache for not found wrapper class to avoid trying load them for many times
  ........
................

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.5.x-fixes:r1327780
  Merged /cxf/trunk:r1327778

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=1327786&r1=1327785&r2=1327786&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Thu Apr 19 02:31:32 2012
@@ -24,7 +24,9 @@ import java.lang.reflect.Method;
 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 @@ public class JaxWsServiceConfiguration e
      */
     private Map<Object, Class> responseMethodClassCache;
     private Map<Object, Class> requestMethodClassCache;
+    private List<Method> responseMethodClassNotFoundCache;
+    private List<Method> requestMethodClassNotFoundCache;
     private Map<Method, Annotation[][]> methodAnnotationCache;
     
     public JaxWsServiceConfiguration() {
         responseMethodClassCache = new HashMap<Object, Class>();
         requestMethodClassCache = new HashMap<Object, Class>();
+        responseMethodClassNotFoundCache = new ArrayList<Method>();
+        requestMethodClassNotFoundCache = new ArrayList<Method>();
         methodAnnotationCache = new HashMap<Method, Annotation[][]>();
     }
 
@@ -598,6 +604,9 @@ public class JaxWsServiceConfiguration e
     
     @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 @@ public class JaxWsServiceConfiguration e
                 //do nothing, we will mock a schema for wrapper bean later on
             }
         }
-
+        responseMethodClassNotFoundCache.add(selected);
         return null;
     }
 
@@ -669,6 +678,9 @@ public class JaxWsServiceConfiguration e
     
     @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 @@ public class JaxWsServiceConfiguration e
                 //do nothing, we will mock a schema for wrapper bean later on
             }
         }
-
+        requestMethodClassNotFoundCache.add(selected);
         return null;
     }
     



Mime
View raw message