浏览代码

HPCC-21594 Calling Java non-static methods fails on second call

Also added examples from blog, and allowed the release method to return a
value.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 6 年之前
父节点
当前提交
93336cf02c
共有 30 个文件被更改,包括 668 次插入16 次删除
  1. 25 16
      plugins/javaembed/javaembed.cpp
  2. 29 0
      testing/regress/ecl/javaembed_ex1.ecl
  3. 42 0
      testing/regress/ecl/javaembed_ex10.ecl
  4. 55 0
      testing/regress/ecl/javaembed_ex11.ecl
  5. 55 0
      testing/regress/ecl/javaembed_ex12.ecl
  6. 63 0
      testing/regress/ecl/javaembed_ex13.ecl
  7. 43 0
      testing/regress/ecl/javaembed_ex2.ecl
  8. 30 0
      testing/regress/ecl/javaembed_ex3.ecl
  9. 41 0
      testing/regress/ecl/javaembed_ex4.ecl
  10. 38 0
      testing/regress/ecl/javaembed_ex5.ecl
  11. 30 0
      testing/regress/ecl/javaembed_ex6.ecl
  12. 二进制
      testing/regress/ecl/javaembed_ex7.class
  13. 25 0
      testing/regress/ecl/javaembed_ex7.ecl
  14. 二进制
      testing/regress/ecl/javaembed_ex7.jar
  15. 31 0
      testing/regress/ecl/javaembed_ex7.java
  16. 3 0
      testing/regress/ecl/javaembed_ex7.manifest
  17. 49 0
      testing/regress/ecl/javaembed_ex8.ecl
  18. 42 0
      testing/regress/ecl/javaembed_ex9.ecl
  19. 3 0
      testing/regress/ecl/key/javaembed_ex1.xml
  20. 6 0
      testing/regress/ecl/key/javaembed_ex10.xml
  21. 15 0
      testing/regress/ecl/key/javaembed_ex11.xml
  22. 15 0
      testing/regress/ecl/key/javaembed_ex12.xml
  23. 3 0
      testing/regress/ecl/key/javaembed_ex13.xml
  24. 3 0
      testing/regress/ecl/key/javaembed_ex2.xml
  25. 1 0
      testing/regress/ecl/key/javaembed_ex4.xml
  26. 3 0
      testing/regress/ecl/key/javaembed_ex5.xml
  27. 3 0
      testing/regress/ecl/key/javaembed_ex6.xml
  28. 3 0
      testing/regress/ecl/key/javaembed_ex7.xml
  29. 6 0
      testing/regress/ecl/key/javaembed_ex8.xml
  30. 6 0
      testing/regress/ecl/key/javaembed_ex9.xml

+ 25 - 16
plugins/javaembed/javaembed.cpp

@@ -3905,11 +3905,14 @@ public:
                 if (!instance)
                 {
                     if (streq(methodName, "<init>"))
+                    {
                         result.l = JNIenv->NewObjectA(javaClass, javaMethodID, args);
-                    else
-                        throw MakeStringException(0, "non static member function %s called, but no instance available", methodName.get());  // Should never happen
+                        return;
+                    }
+                    assertex(persistMode == persistNone);
+                    instance = createInstance();
                 }
-                else if (javaMethodID)
+                if (javaMethodID)
                 {
                     switch (*returnType)
                     {
@@ -3930,6 +3933,7 @@ public:
                 else
                 {
                     assertex(methodName[0]=='~');
+                    result.l = 0;
                 }
             }
             else
@@ -4084,6 +4088,21 @@ protected:
         }
     }
 
+    jobject createInstance()
+    {
+        jmethodID constructor;
+        try
+        {
+            constructor = JNIenv->GetMethodID(javaClass, "<init>", "()V");
+        }
+        catch (IException *E)
+        {
+            Owned<IException> e = E;
+            throw MakeStringException(0, "parameterless constructor required");
+        }
+        return JNIenv->NewGlobalRef(JNIenv->NewObject(javaClass, constructor));
+    }
+
     void loadFunction(const char *classpath, size32_t bytecodeLen, const byte *bytecode)
     {
         try
@@ -4154,19 +4173,9 @@ protected:
                     }
                     javaClass = (jclass) JNIenv->NewGlobalRef(javaClass);
                 }
-                if (nonStatic && !instance && !isConstructor)
+                if (nonStatic && !instance && !isConstructor && persistMode != persistNone)
                 {
-                    jmethodID constructor;
-                    try
-                    {
-                        constructor = JNIenv->GetMethodID(javaClass, "<init>", "()V");
-                    }
-                    catch (IException *E)
-                    {
-                        Owned<IException> e = E;
-                        throw MakeStringException(0, "parameterless constructor required");
-                    }
-                    instance = JNIenv->NewGlobalRef(JNIenv->NewObject(javaClass, constructor));
+                    instance = createInstance();
                     if (persistBlock.locked())
                     {
                         if (persistMode==persistQuery || persistMode==persistWorkunit)
@@ -4191,7 +4200,7 @@ protected:
                     shortClassName = myClassName;
                 if (!streq(methodName+1, shortClassName))
                     throw MakeStringException(0, "class name %s does not match", shortClassName);
-                signature.set("()V");
+                signature.set("()L");  // We return 0
             }
             else
             {

+ 29 - 0
testing/regress/ecl/javaembed_ex1.ecl

@@ -0,0 +1,29 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+import java;
+string cat(string a, string b) := EMBED(java)
+  public static String cat(String a, String b)
+  {
+    return a + b;
+  }
+ENDEMBED;
+
+OUTPUT(cat('Hello ', 'Java'));

+ 42 - 0
testing/regress/ecl/javaembed_ex10.ecl

@@ -0,0 +1,42 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+IMPORT Java;
+
+INTEGER accumulate(integer a) := EMBED(Java : PERSIST('Thread'))
+public class Accumulator
+{
+  public Accumulator()
+  {
+  }
+  public synchronized int accumulate(int a)
+  {
+    total = total + a;
+    return total;
+  }
+  private int total = 0;
+}
+ENDEMBED;
+
+sequential
+(
+  accumulate(1);
+  accumulate(2);
+)

+ 55 - 0
testing/regress/ecl/javaembed_ex11.ecl

@@ -0,0 +1,55 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+IMPORT Java;
+
+unsigned persister(integer initial) := EMBED(Java)
+public class persister
+{
+  public persister(int initial) { tot = initial; }
+  public synchronized int accumulate(int a)
+  {
+    tot = tot + a;
+    return tot;
+  }
+  public synchronized int clear()
+  {
+    int _tot = tot;
+    tot = 0;
+    return _tot;
+  }
+  private int tot = 0;
+}
+ENDEMBED;
+
+integer accumulate(unsigned p, integer val) := IMPORT(Java, 'accumulate');
+integer clear(unsigned p) := IMPORT(Java, 'clear');
+release(unsigned p) := IMPORT(Java, '~persister'); // After calling this the java object p is no longer usable
+
+p := persister(35) : global;
+
+sequential(
+  accumulate(p, 1);
+  accumulate(p, 2);
+  accumulate(p, 3);
+  clear(p);
+  accumulate(p, 10);
+  release(p);  
+);

+ 55 - 0
testing/regress/ecl/javaembed_ex12.ecl

@@ -0,0 +1,55 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+IMPORT Java;
+
+unsigned persister(integer initial) := EMBED(Java : persist('workunit'))
+public class persister
+{
+  public persister(int initial) { tot = initial; }
+  public synchronized int accumulate(int a)
+  {
+    tot = tot + a;
+    return tot;
+  }
+  public synchronized int clear()
+  {
+    int _tot = tot;
+    tot = 0;
+    return _tot;
+  }
+  private int tot = 0;
+}
+ENDEMBED;
+
+integer accumulate(unsigned p, integer val) := IMPORT(Java, 'accumulate');
+integer clear(unsigned p) := IMPORT(Java, 'clear');
+release(unsigned p) := IMPORT(Java, '~persister'); // After calling this the java object p is no longer usable
+
+p := persister(35) : independent;
+
+sequential(
+  accumulate(p, 1);
+  accumulate(p, 2);
+  accumulate(p, 3);
+  clear(p);
+  accumulate(p, 10);
+  release(p);  
+);

+ 63 - 0
testing/regress/ecl/javaembed_ex13.ecl

@@ -0,0 +1,63 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2018 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+//nohthor
+
+IMPORT Java;
+
+unsigned persister(integer initial) := EMBED(Java)
+public class persister
+{
+  public persister(int initial) { tot = initial; }
+  public synchronized int accumulate(int a)
+  {
+    tot = tot + a;
+    return tot;
+  }
+  public synchronized int clear()
+  {
+    int _tot = tot;
+    tot = 0;
+    return _tot;
+  }
+  private int tot = 0;
+}
+ENDEMBED;
+
+integer accumulate(unsigned p, integer val) := IMPORT(Java, 'accumulate');
+integer clear(unsigned p) := IMPORT(Java, 'clear');
+unsigned release(unsigned p) := IMPORT(Java, '~persister'); // After calling this the java object p is no longer usable
+
+r := record
+  integer i;
+  unsigned p := 0;
+end;
+
+r t(r l, r r) := TRANSFORM
+  SELF.p := IF (l.p=0,persister(l.p),l.p);
+  SELF.i := accumulate(self.p, r.i);
+END;
+
+d1 := DATASET([{1}, {2}, {3}], r);
+
+accumulated := ITERATE(d1, t(LEFT, RIGHT), LOCAL);
+
+OUTPUT(accumulated);
+objects := TABLE(GROUP(accumulated, TRUE, LOCAL), {px := MAX(GROUP,p)});
+APPLY(objects,EVALUATE(release(px)));

+ 43 - 0
testing/regress/ecl/javaembed_ex2.ecl

@@ -0,0 +1,43 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+import java;
+SET OF STRING split(STRING s) := EMBED(java)
+
+import java.util.StringTokenizer;
+import java.util.ArrayList;
+
+public class myClass
+{
+  public static String[] split(String inStr)
+  {
+    ArrayList<String> result =  new ArrayList<String>();
+    StringTokenizer token = new StringTokenizer(inStr);
+    while (token.hasMoreTokens())
+    {
+      result.add(token.nextToken());
+    }
+    return result.toArray(new String[0]);
+  }
+}
+
+ENDEMBED;
+
+output(split('Hello java'));

+ 30 - 0
testing/regress/ecl/javaembed_ex3.ecl

@@ -0,0 +1,30 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+//class=error
+
+import java;
+string cat(string a, string b) := EMBED(java)
+  public static String cat(int a, String b)
+  {
+    return a + c;
+  }
+ENDEMBED;
+
+OUTPUT(cat('Hello ', 'Java'));

+ 41 - 0
testing/regress/ecl/javaembed_ex4.ecl

@@ -0,0 +1,41 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+import java;
+
+boolean reverse := false : STORED('reverse');
+
+string myJavaCode := '''
+  public static String cat(String a, String b)
+  {
+    return a + b;
+  }
+''';
+
+string myOtherJavaCode := '''
+  public static String cat(String a, String b)
+  {
+    return b + a;
+  }
+''';
+
+String cat(String a, String b) := EMBED(Java, IF(reverse, myOtherJavaCode, myJavaCode));
+
+OUTPUT(cat('Hello ', 'Java'));

+ 38 - 0
testing/regress/ecl/javaembed_ex5.ecl

@@ -0,0 +1,38 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+import java;
+
+major := 1;
+minor := 0;
+point := 1;
+
+String getVersion(integer a, integer b, integer c) := EMBED(Java: FOLD)
+String getVersion(int a, int b, int c) 
+{
+  return Integer.toString(a) + '.' + Integer.toString(b) + '.' + Integer.toString(c);
+}
+ENDEMBED;
+
+#if (getVersion(major, minor, point)='1.0.0')
+  OUTPUT('Version is too old')
+#else
+  OUTPUT('Version is good');
+#end

+ 30 - 0
testing/regress/ecl/javaembed_ex6.ecl

@@ -0,0 +1,30 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+import java;
+
+STRING getCode() := EMBED(Java: FOLD)
+String getCode() 
+{
+  return "OUTPUT('Hello world!');";
+}
+ENDEMBED;
+
+#expand (getCode())

二进制
testing/regress/ecl/javaembed_ex7.class


+ 25 - 0
testing/regress/ecl/javaembed_ex7.ecl

@@ -0,0 +1,25 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+IMPORT java;
+
+STRING cat(SET OF STRING s) := IMPORT(java, 'javaembed_ex7.cat:([Ljava/lang/String;)Ljava/lang/String;');
+
+export javaembed_ex7 := cat(['Hello','World']);

二进制
testing/regress/ecl/javaembed_ex7.jar


+ 31 - 0
testing/regress/ecl/javaembed_ex7.java

@@ -0,0 +1,31 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+class javaembed_ex7
+{
+  public static String cat(String input[])
+  {
+    StringBuffer ret = new StringBuffer();
+    for (String item:input)
+    {
+      if (ret.length() > 0)
+        ret.append(" ");
+      ret.append(item);
+    }
+    return ret.toString();
+  }
+}

+ 3 - 0
testing/regress/ecl/javaembed_ex7.manifest

@@ -0,0 +1,3 @@
+<Manifest>
+ <Resource type='jar' filename='javaembed_ex7.jar'/>
+</Manifest>

+ 49 - 0
testing/regress/ecl/javaembed_ex8.ecl

@@ -0,0 +1,49 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+IMPORT Java;
+
+INTEGER accumulate(integer a) := EMBED(Java)
+public class Accumulator
+{
+  public Accumulator()
+  {
+  }
+  public synchronized int doAccumulate(int a)
+  {
+    total = total + a;
+    return total;
+  }
+  public synchronized static int accumulate(int a)
+  {
+    if (accumulator==null)
+      accumulator = new Accumulator();
+    return accumulator.doAccumulate(a);
+  }
+  private int total = 0;
+  private static Accumulator accumulator;
+}
+ENDEMBED;
+
+sequential
+(
+  accumulate(1);
+  accumulate(2);
+)

+ 42 - 0
testing/regress/ecl/javaembed_ex9.ecl

@@ -0,0 +1,42 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+//class=embedded
+//class=3rdparty
+
+IMPORT Java;
+
+INTEGER accumulate(integer a) := EMBED(Java)
+public class Accumulator
+{
+  public Accumulator()
+  {
+  }
+  public synchronized int accumulate(int a)
+  {
+    total = total + a;
+    return total;
+  }
+  private int total = 0;
+}
+ENDEMBED;
+
+sequential
+(
+  accumulate(1);
+  accumulate(2);
+)

+ 3 - 0
testing/regress/ecl/key/javaembed_ex1.xml

@@ -0,0 +1,3 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>Hello Java</Result_1></Row>
+</Dataset>

+ 6 - 0
testing/regress/ecl/key/javaembed_ex10.xml

@@ -0,0 +1,6 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>1</Result_1></Row>
+</Dataset>
+<Dataset name='Result 2'>
+ <Row><Result_2>3</Result_2></Row>
+</Dataset>

+ 15 - 0
testing/regress/ecl/key/javaembed_ex11.xml

@@ -0,0 +1,15 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>36</Result_1></Row>
+</Dataset>
+<Dataset name='Result 2'>
+ <Row><Result_2>37</Result_2></Row>
+</Dataset>
+<Dataset name='Result 3'>
+ <Row><Result_3>38</Result_3></Row>
+</Dataset>
+<Dataset name='Result 4'>
+ <Row><Result_4>35</Result_4></Row>
+</Dataset>
+<Dataset name='Result 5'>
+ <Row><Result_5>45</Result_5></Row>
+</Dataset>

+ 15 - 0
testing/regress/ecl/key/javaembed_ex12.xml

@@ -0,0 +1,15 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>36</Result_1></Row>
+</Dataset>
+<Dataset name='Result 2'>
+ <Row><Result_2>38</Result_2></Row>
+</Dataset>
+<Dataset name='Result 3'>
+ <Row><Result_3>41</Result_3></Row>
+</Dataset>
+<Dataset name='Result 4'>
+ <Row><Result_4>41</Result_4></Row>
+</Dataset>
+<Dataset name='Result 5'>
+ <Row><Result_5>10</Result_5></Row>
+</Dataset>

+ 3 - 0
testing/regress/ecl/key/javaembed_ex13.xml

@@ -0,0 +1,3 @@
+1,140685048029976
+3,140685048029976
+6,140685048029976

+ 3 - 0
testing/regress/ecl/key/javaembed_ex2.xml

@@ -0,0 +1,3 @@
+<Dataset name='Result 1'>
+ <Row><Result_1><Item>Hello</Item><Item>java</Item></Result_1></Row>
+</Dataset>

+ 1 - 0
testing/regress/ecl/key/javaembed_ex4.xml

@@ -0,0 +1 @@
+Hello Java

+ 3 - 0
testing/regress/ecl/key/javaembed_ex5.xml

@@ -0,0 +1,3 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>Version is good</Result_1></Row>
+</Dataset>

+ 3 - 0
testing/regress/ecl/key/javaembed_ex6.xml

@@ -0,0 +1,3 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>Hello world!</Result_1></Row>
+</Dataset>

+ 3 - 0
testing/regress/ecl/key/javaembed_ex7.xml

@@ -0,0 +1,3 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>Hello World</Result_1></Row>
+</Dataset>

+ 6 - 0
testing/regress/ecl/key/javaembed_ex8.xml

@@ -0,0 +1,6 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>1</Result_1></Row>
+</Dataset>
+<Dataset name='Result 2'>
+ <Row><Result_2>3</Result_2></Row>
+</Dataset>

+ 6 - 0
testing/regress/ecl/key/javaembed_ex9.xml

@@ -0,0 +1,6 @@
+<Dataset name='Result 1'>
+ <Row><Result_1>1</Result_1></Row>
+</Dataset>
+<Dataset name='Result 2'>
+ <Row><Result_2>2</Result_2></Row>
+</Dataset>