cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r638416 - in /incubator/cxf/branches/2.0.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Date Tue, 18 Mar 2008 15:30:21 GMT
Author: dkulp
Date: Tue Mar 18 08:30:20 2008
New Revision: 638416

URL: http://svn.apache.org/viewvc?rev=638416&view=rev
Log:
Merged revisions 638170 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r638170 | bimargulies | 2008-03-17 21:38:32 -0400 (Mon, 17 Mar 2008) | 2 lines
  
  add another cache to reduce reflection costs.
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.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/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?rev=638416&r1=638415&r2=638416&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ incubator/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Tue Mar 18 08:30:20 2008
@@ -68,10 +68,12 @@
      */
     private Map<Object, Class> responseMethodClassCache;
     private Map<Object, Class> requestMethodClassCache;
+    private Map<Method, Annotation[][]> methodAnnotationCache;
     
     public JaxWsServiceConfiguration() {
         responseMethodClassCache = new HashMap<Object, Class>();
         requestMethodClassCache = new HashMap<Object, Class>();
+        methodAnnotationCache = new HashMap<Method, Annotation[][]>();
     }
 
     @Override
@@ -312,7 +314,12 @@
     }
 
     private WebParam getWebParam(Method method, int parameter) {
-        Annotation[][] annotations = method.getParameterAnnotations();
+        // we could really use a centralized location for this.
+        Annotation[][] annotations = methodAnnotationCache.get(method);
+        if (annotations == null) {
+            annotations = method.getParameterAnnotations();
+            methodAnnotationCache.put(method, annotations);
+        } 
         if (parameter >= annotations.length) {
             return null;
         } else {
@@ -530,6 +537,7 @@
         if (clsName.length() > 0) {
             cachedClass = responseMethodClassCache.get(clsName);
             if (cachedClass != null) {
+                responseMethodClassCache.put(selected, cachedClass);
                 return cachedClass;
             }
             try {
@@ -593,6 +601,7 @@
         if (clsName.length() > 0) {
             cachedClass = requestMethodClassCache.get(clsName);
             if (cachedClass != null) {
+                requestMethodClassCache.put(selected, cachedClass);
                 return cachedClass;
             }
             try {



Mime
View raw message