Author: karthick
Date: Fri Feb 27 22:35:24 2009
New Revision: 748724

URL: http://svn.apache.org/viewvc?rev=748724&view=rev
Log:
ODE-532 Reset User Data On XQuery Expression Post Compilation

Modified:
    
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java
    
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
    
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestXQueryExpression/HelloXQueryWorld.bpel

Modified: 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java?rev=748724&r1=748723&r2=748724&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/bpel-compiler/src/main/java/org/apache/ode/bpel/elang/xquery10/compiler/XQuery10ExpressionCompilerImpl.java
 Fri Feb 27 22:35:24 2009
@@ -260,6 +260,12 @@
                 exp.executeQuery();
             } catch (XQException xpee) { 
                // swallow errors caused by uninitialized variables 
+            } finally {
+               // reset the expression's user data, in order to avoid 
+               // serializing the function resolver in the compiled bpel file.
+               if (node != null) {
+                       
node.setUserData(XQuery10BpelFunctions.USER_DATA_KEY_FUNCTION_RESOLVER, null, 
null);
+               }
             }
         } catch (XQException xqe) {
             __log.debug(xqe);

Modified: 
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java?rev=748724&r1=748723&r2=748724&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/java/org/apache/ode/test/DataHandling20Test.java
 Fri Feb 27 22:35:24 2009
@@ -18,68 +18,107 @@
  */
 package org.apache.ode.test;
 
-import org.junit.Ignore;
 import org.junit.Test;
 
 public class DataHandling20Test extends BPELTestAbstract {
-        @Test public void testComposeUrl() throws Throwable {
+    @Test
+    public void testComposeUrl() throws Throwable {
         go("/bpel/2.0/TestComposeUrl");
     }
-     @Test public void testCombineUrl() throws Throwable {
+
+    @Test
+    public void testCombineUrl() throws Throwable {
         go("/bpel/2.0/TestCombineUrl");
     }
-     @Test public void testExpandTemplate() throws Throwable {
+
+    @Test
+    public void testExpandTemplate() throws Throwable {
         go("/bpel/2.0/TestExpandTemplate");
     }
-     @Test public void testXPathNamespace1() throws Throwable {
+
+    @Test
+    public void testXPathNamespace1() throws Throwable {
         go("/bpel/2.0/TestXPathNamespace1");
     }
-     @Test public void testXPathNamespace2() throws Throwable {
+
+    @Test
+    public void testXPathNamespace2() throws Throwable {
         go("/bpel/2.0/TestXPathNamespace2");
     }
-     @Test public void testSubTreeAssign() throws Throwable {
+
+    @Test
+    public void testSubTreeAssign() throws Throwable {
         go("/bpel/2.0/TestSubTreeAssign");
     }
-     @Test public void testAssignActivity1() throws Throwable {
+
+    @Test
+    public void testAssignActivity1() throws Throwable {
         go("/bpel/2.0/TestAssignActivity1");
     }
-    @Test public void testAssignActivity2() throws Throwable {
+
+    @Test
+    public void testAssignActivity2() throws Throwable {
         go("/bpel/2.0/TestAssignActivity2");
     }
-     @Test public void testAssignComplex() throws Throwable {
+
+    @Test
+    public void testAssignComplex() throws Throwable {
         go("/bpel/2.0/TestAssignComplex");
     }
-     @Test public void testSimpleTypeParts() throws Throwable {
+
+    @Test
+    public void testSimpleTypeParts() throws Throwable {
         go("/bpel/2.0/TestSimpleTypeParts");
     }
-     @Test public void testSimpleVariableType() throws Throwable {
+
+    @Test
+    public void testSimpleVariableType() throws Throwable {
         go("/bpel/2.0/TestSimpleVariableType");
     }
-    @Test public void testXslTransform() throws Throwable {
+
+    @Test
+    public void testXslTransform() throws Throwable {
         go("/bpel/2.0/TestXslTransform");
     }
-     @Test public void testSplit() throws Throwable {
+
+    @Test
+    public void testSplit() throws Throwable {
         go("/bpel/2.0/TestSplit");
     }
-     @Test public void testCounter() throws Throwable {
+
+    @Test
+    public void testCounter() throws Throwable {
         go("/bpel/2.0/TestCounter");
     }
-     @Test public void testDate() throws Throwable {
+
+    @Test
+    public void testDate() throws Throwable {
         go("/bpel/2.0/TestAssignDate");
     }
-     @Test public void testMsgDate() throws Throwable {
+
+    @Test
+    public void testMsgDate() throws Throwable {
         go("/bpel/2.0/TestMsgDate");
     }
-     @Test public void testDuration() throws Throwable {
+
+    @Test
+    public void testDuration() throws Throwable {
         go("/bpel/2.0/TestDuration");
     }
-     @Test public void testAssignMissingData() throws Throwable {
-      go("/bpel/2.0/TestAssignMissingData");
+
+    @Test
+    public void testAssignMissingData() throws Throwable {
+        go("/bpel/2.0/TestAssignMissingData");
     }
-     @Test public void testXQueryExpression() throws Throwable {
-        go("/bpel/2.0/TestXQueryExpression");
+
+    @Test
+    public void testXQueryExpression() throws Throwable {
+        deploy("/bpel/2.0/TestXQueryExpression");
+        go();
     }
-     @Test public void testInsertMissingData() throws Throwable {
+
+    @Test
+    public void testInsertMissingData() throws Throwable {
         go("/bpel/2.0/TestInsertMissingData");
-     }
+    }
 }

Modified: 
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestXQueryExpression/HelloXQueryWorld.bpel
URL: 
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestXQueryExpression/HelloXQueryWorld.bpel?rev=748724&r1=748723&r2=748724&view=diff
==============================================================================
--- 
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestXQueryExpression/HelloXQueryWorld.bpel
 (original)
+++ 
ode/branches/APACHE_ODE_1.X/bpel-test/src/test/resources/bpel/2.0/TestXQueryExpression/HelloXQueryWorld.bpel
 Fri Feb 27 22:35:24 2009
@@ -46,6 +46,11 @@
     </variables>
             
     <sequence>   
+        <ext:failureHandling 
xmlns:ext="http://ode.apache.org/activityRecovery";>
+          <ext:faultOnFailure>true</ext:faultOnFailure>
+          <ext:retryFor>5</ext:retryFor>
+          <ext:retryDelay>60</ext:retryDelay>
+        </ext:failureHandling>
         <receive 
             name="start"
             partnerLink="HelloXQueryPartnerLink"


Reply via email to