Index: java/engine/org/apache/derby/iapi/services/info/JVMInfo.java =================================================================== --- java/engine/org/apache/derby/iapi/services/info/JVMInfo.java (revision 464758) +++ java/engine/org/apache/derby/iapi/services/info/JVMInfo.java (working copy) @@ -139,6 +139,13 @@ } } } + + // current workround for Harmony IBM VME since its java.version is still + // 1.4.2 + if (System.getProperty("java.vm.name").equals("J9") + && System.getProperty("java.vm.version").equals("2.3")) { + id = J2SE_15; + } JDK_ID = id; J2ME = isJ2ME; Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits_app.properties =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits_app.properties (revision 464758) +++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/dbManagerLimits_app.properties (working copy) @@ -1,2 +1,2 @@ usedefaults=true -jvmflags=-ms32M -mx128M +jvmflags= Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_app.properties =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_app.properties (revision 464758) +++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_app.properties (working copy) @@ -11,7 +11,7 @@ # flags specific to this test: it runs out of memory on jdk118 sometimes # so give the JVM more memory always: -jvmflags=-ms32M^-mx128M +jvmflags= usedefaults=true Index: java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream_app.properties =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream_app.properties (revision 464758) +++ java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream_app.properties (working copy) @@ -1,2 +1,2 @@ usedefaults=true -jvmflags=-ms32M^-mx128M +jvmflags= Index: java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (revision 464758) +++ java/testing/org/apache/derbyTesting/functionTests/harness/RunTest.java (working copy) @@ -433,6 +433,10 @@ boolean status; // allow for server jvmName to be different from client jvmName + if(Harmony.isHarmony()) + { + jvmName = Harmony.getJvmName(); + } if (jvmnet) { // first check to see if properties were set to use a different jvm for server/client @@ -1003,9 +1007,11 @@ { if (System.getProperty("java.vm.vendor").startsWith("IBM")) { - if (System.getProperty("java.vm.name").equals("J9")) + if (System.getProperty("java.vm.name").equals("J9")) + { - if (System.getProperty("com.ibm.oti.configuration").equals("foun10")) + String configuration = System.getProperty("com.ibm.oti.configuration"); + if (configuration!=null && configuration.equals("foun10")) { jvmName = "j9_foundation"; } Index: java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java (revision 464758) +++ java/testing/org/apache/derbyTesting/functionTests/harness/RunSuite.java (working copy) @@ -90,7 +90,7 @@ public static void main(String[] args) throws Exception { - if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) + if (!Harmony.isHarmony() &&(System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) { javaCmd = "j9"; String javaHome = System.getProperty("java.home"); @@ -377,7 +377,7 @@ suiteProperties.put("jversion", j); String jcmd = sp.getProperty("javaCmd"); - if ((System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) + if (!Harmony.isHarmony()&&(System.getProperty("java.vm.name") != null) && System.getProperty("java.vm.name").equals("J9")) jcmd = "j9"; if (jcmd != null) { Index: java/testing/org/apache/derbyTesting/functionTests/harness/SysInfoLog.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/harness/SysInfoLog.java (revision 464758) +++ java/testing/org/apache/derbyTesting/functionTests/harness/SysInfoLog.java (working copy) @@ -56,7 +56,11 @@ jvmName = "jdk13"; else if (jvmName.startsWith("jdk13")) jvmName = "jdk13"; - + + if(Harmony.isHarmony()) { + jvmName = Harmony.getJvmName(); + } + javavm = jvm.getJvm(jvmName); if (javaCmd != null) javavm.setJavaCmd(javaCmd); Index: java/testing/org/apache/derbyTesting/functionTests/harness/Harmony.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/harness/Harmony.java (revision 0) +++ java/testing/org/apache/derbyTesting/functionTests/harness/Harmony.java (revision 0) @@ -0,0 +1,33 @@ +package org.apache.derbyTesting.functionTests.harness; +public class Harmony +{ + private static boolean isharmony = false; + private static final String JAVA_VM_NAME="java.vm.name"; + private static final String JAVA_VM_VERSION="java.vm.version"; + private static final String HARMONY_VM_NAME_VALUE="J9"; + private static final String HARMONY_VM_VERSION="2.3"; + private static final String JVM_NAME="jdk15"; + + static + { + if(System.getProperty(JAVA_VM_NAME).equals(HARMONY_VM_NAME_VALUE) && System.getProperty(JAVA_VM_VERSION).equals(HARMONY_VM_VERSION)) + { + isharmony = true; + } + } + + public static boolean isHarmony() + { + return isharmony; + } + + public static String getJvmName() + { + return JVM_NAME; + } + + public static jvm getJvm() + { + return new j9_23(); + } +} Index: java/testing/org/apache/derbyTesting/functionTests/harness/j9_23.java =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/harness/j9_23.java (revision 0) +++ java/testing/org/apache/derbyTesting/functionTests/harness/j9_23.java (revision 0) @@ -0,0 +1,102 @@ +/* + + Derby - Class org.apache.derbyTesting.functionTests.harness.jdk15 + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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. + + */ + +package org.apache.derbyTesting.functionTests.harness; + +import java.util.Vector; +import java.util.StringTokenizer; + +/** +

This class is for JDK1.5. + + @author ames + */ +public class j9_23 extends jvm { + + public String getName(){return "j9_23";} + public j9_23(boolean noasyncgc, boolean verbosegc, boolean noclassgc, + long ss, long oss, long ms, long mx, String classpath, String prof, + boolean verify, boolean noverify, boolean nojit, Vector D) { + super(noasyncgc,verbosegc,noclassgc,ss,oss,ms,mx,classpath,prof, + verify,noverify,nojit,D); + } + // more typical use: + public j9_23(String classpath, Vector D) { + super(classpath,D); + } + // more typical use: + public j9_23(long ms, long mx, String classpath, Vector D) { + super(ms,mx,classpath,D); + } + // actual use + public j9_23() { } + + // return the command line to invoke this VM. The caller then adds + // the class and program arguments. + public Vector getCommandLine() + { + StringBuffer sb = new StringBuffer(); + Vector v = super.getCommandLine(); + appendOtherFlags(sb); + String s = sb.toString(); + StringTokenizer st = new StringTokenizer(s); + while (st.hasMoreTokens()) + { + v.addElement(st.nextToken()); + } + return v; + } + + public void appendOtherFlags(StringBuffer sb) + { + if (noasyncgc) warn("j9_23 does not support noasyncgc"); + if (verbosegc) sb.append(" -verbose:gc"); + if (noclassgc) sb.append(" -Xnoclassgc"); + if (ss>=0) warn("j9_23 does not support ss"); + if (oss>=0) warn("j9_23 does not support oss"); + if (ms>=0) { + sb.append(" -ms"); + sb.append(ms); + } + if (mx>=0) { + sb.append(" -mx"); + sb.append(mx); + } + if (classpath!=null) { + sb.append(" -classpath "); + sb.append(classpath); + } + if (prof!=null) warn("j9_23 does not support prof"); + if (verify) warn("j9_23 does not support verify"); + if (noverify) warn("j9_23 does not support noverify"); + if (nojit) sb.append(" -Djava.compiler=NONE"); + if (D != null) + for (int i=0; i */ public static jvm getJvm(String jvmName) throws ClassNotFoundException, InstantiationException, IllegalAccessException { - jvm result = null; + if(Harmony.isHarmony()){ + return Harmony.getJvm(); + } + jvm result = null; try { result = (jvm)Class.forName(jvmName).newInstance(); } catch (ClassNotFoundException e) { Index: java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties =================================================================== --- java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties (revision 464758) +++ java/testing/org/apache/derbyTesting/functionTests/suites/derbyall.properties (working copy) @@ -1,3 +1,3 @@ -suites=derbylang derbynetmats storeall xa derbytools jdbc20 jdbc40 jdk14 jdbcapi derbynetclientmats encryptionAll nist demo multi unit i18nTest upgrade +suites=derbylang derbynetmats storeall xa derbytools jdbc20 jdbc40 jdk14 jdbcapi encryptionAll nist demo multi unit i18nTest upgrade derby.debug.true=enableBtreeConsistencyCheck derby.stream.error.logSeverityLevel=0