You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by em...@apache.org on 2012/04/19 04:14:47 UTC
svn commit: r1327780 - in /cxf/branches/2.5.x-fixes: ./
rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Author: ema
Date: Thu Apr 19 02:14:47 2012
New Revision: 1327780
URL: http://svn.apache.org/viewvc?rev=1327780&view=rev
Log:
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.5.x-fixes/ (props changed)
cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
svn:mergeinfo = /cxf/trunk:1327778
Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=1327780&r1=1327779&r2=1327780&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java (original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java Thu Apr 19 02:14:47 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;
}