axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r630910 - /webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
Date Mon, 25 Feb 2008 16:07:23 GMT
Author: dims
Date: Mon Feb 25 08:07:21 2008
New Revision: 630910

URL: http://svn.apache.org/viewvc?rev=630910&view=rev
Log:
[PERF] Contribution from David Strite. OperationDescriptionImpl.getResultActualType() does
a fair amount of checking to get the right class for the result. This can be cached and reused
so that the checking is only done once.


Modified:
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java?rev=630910&r1=630909&r2=630910&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/OperationDescriptionImpl.java
Mon Feb 25 08:07:21 2008
@@ -194,6 +194,8 @@
     // RUNTIME INFORMATION
     Map<String, OperationRuntimeDescription> runtimeDescMap =
             Collections.synchronizedMap(new HashMap<String, OperationRuntimeDescription>());
+    // Cache the actual Class of the type being returned. 
+    private Class resultActualTypeClazz;
 
     OperationDescriptionImpl(Method method, EndpointInterfaceDescription parent) {
         // TODO: Look for WebMethod anno; get name and action off of it
@@ -1555,6 +1557,13 @@
      * @see org.apache.axis2.jaxws.description.OperationDescription#getResultActualType()
      */
     public Class getResultActualType() {
+        if(resultActualTypeClazz != null) {
+            resultActualTypeClazz = findResultActualType();    
+        }
+        return resultActualTypeClazz;
+    }
+    
+    public Class findResultActualType() {
         // TODO: Fix this!  it isn't doing the right thing for DBC as noted below with FIXME
comments
         //       This is used to marshall the rsp on the service (dbc) and demarshall on
the client (reflection)
         //       But we shouldn't get an async OpDesc on the service since getDispatchableOperation(QN)
removes them.



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message