axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject svn commit: r535347 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: client/OperationClient.java context/ServiceContext.java description/OutInAxisOperation.java description/OutOnlyAxisOperation.java
Date Fri, 04 May 2007 18:45:44 GMT
Author: gdaniels
Date: Fri May  4 11:45:15 2007
New Revision: 535347

URL: http://svn.apache.org/viewvc?view=rev&rev=535347
Log:
Move caching of last OperationContext to OperationClient.execute(), which is now final (subclasses
override executeImpl()).  This correctly caches each time an operation is executed, instead
of each time one is created.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutOnlyAxisOperation.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java?view=diff&rev=535347&r1=535346&r2=535347
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/client/OperationClient.java
Fri May  4 11:45:15 2007
@@ -70,10 +70,6 @@
         this.options = new Options(options);
         completed = false;
         oc = ContextFactory.createOperationContext(axisOp, sc);
-        
-        if (sc.isCachingOperationContext()) {
-            sc.setLastOperationContext(oc);
-        }
     }
 
     /**
@@ -132,6 +128,24 @@
     public abstract void setCallback(Callback callback);
 
     /**
+     * Execute the MEP.  This method is final and only serves to set (if appropriate)
+     * the lastOperationContext on the ServiceContext, and then it calls
+     * executeImpl(), which does the actual work.
+     *
+     * @param block Indicates whether execution should block or return ASAP. What
+     *              block means is of course a function of the specific operation
+     *              client.
+     * @throws AxisFault if something goes wrong during the execution of the operation
+     *                   client.
+     */
+    public final void execute(boolean block) throws AxisFault {
+        if (sc.isCachingOperationContext()) {
+            sc.setLastOperationContext(oc);
+        }
+        executeImpl(block);
+    }
+
+    /**
      * Execute the MEP. What this does depends on the specific operation client.
      * The basic idea is to have the operation client execute and do something
      * with the messages that have been added to it so far. For example, if its
@@ -145,7 +159,7 @@
      * @throws AxisFault if something goes wrong during the execution of the operation
      *                   client.
      */
-    public abstract void execute(boolean block) throws AxisFault;
+    public abstract void executeImpl(boolean block) throws AxisFault;
 
     /**
      * Reset the operation client to a clean status after the MEP has completed.

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java?view=diff&rev=535347&r1=535346&r2=535347
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ServiceContext.java
Fri May  4 11:45:15 2007
@@ -151,10 +151,6 @@
 
     public OperationContext createOperationContext(AxisOperation axisOp) {
         OperationContext ctx = ContextFactory.createOperationContext(axisOp, this);
-        if (cachingOperationContext) {
-            // Squirrel this away for anyone who wants it later
-            lastOperationContext = ctx;
-        }
         return ctx;
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=535347&r1=535346&r2=535347
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
Fri May  4 11:45:15 2007
@@ -154,7 +154,7 @@
      *              client. IGNORED BY THIS MEP CLIENT.
      * @throws AxisFault if something goes wrong during the execution of the MEP.
      */
-    public void execute(boolean block) throws AxisFault {
+    public void executeImpl(boolean block) throws AxisFault {
         if (log.isDebugEnabled()) {
             log.debug("Entry: OutInAxisOperationClient::execute, " + block);
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutOnlyAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutOnlyAxisOperation.java?view=diff&rev=535347&r1=535346&r2=535347
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutOnlyAxisOperation.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutOnlyAxisOperation.java
Fri May  4 11:45:15 2007
@@ -236,7 +236,7 @@
      *              client. IGNORED BY THIS MEP CLIENT.
      * @throws AxisFault if something goes wrong during the execution of the MEP.
      */
-    public void execute(boolean block) throws AxisFault {
+    public void executeImpl(boolean block) throws AxisFault {
         if (completed) {
             throw new AxisFault(Messages.getMessage("mepiscomplted"));
         }



---------------------------------------------------------------------
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